From b9d6bc3b7952f137383d29d4236016f8e37f4c13 Mon Sep 17 00:00:00 2001 From: Kip Macy Date: Wed, 14 Mar 2007 06:33:28 +0000 Subject: [PATCH] make desc_reclaimable macro safe to arbitrary arguments --- sys/dev/cxgb/cxgb_adapter.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/cxgb/cxgb_adapter.h b/sys/dev/cxgb/cxgb_adapter.h index d401f9bacd6b..534e31409084 100644 --- a/sys/dev/cxgb/cxgb_adapter.h +++ b/sys/dev/cxgb/cxgb_adapter.h @@ -411,7 +411,7 @@ void t3_update_qset_coalesce(struct sge_qset *qs, const struct qset_params *p); /* * XXX figure out how we can return this to being private to sge */ -#define desc_reclaimable(q) (q->processed - q->cleaned - TX_MAX_DESC) +#define desc_reclaimable(q) ((q)->processed - (q)->cleaned - TX_MAX_DESC) #define container_of(p, stype, field) ((stype *)(((uint8_t *)(p)) - offsetof(stype, field)))