diff options
-rw-r--r-- | sys/net/if_atm.h | 10 | ||||
-rw-r--r-- | sys/net/radix.h | 20 | ||||
-rw-r--r-- | sys/net/route.h | 14 |
3 files changed, 24 insertions, 20 deletions
diff --git a/sys/net/if_atm.h b/sys/net/if_atm.h index 9913a9590ac..965f4bfed3f 100644 --- a/sys/net/if_atm.h +++ b/sys/net/if_atm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_atm.h,v 1.12 2006/06/17 10:22:06 henning Exp $ */ +/* $OpenBSD: if_atm.h,v 1.13 2008/11/07 19:09:03 deraadt Exp $ */ /* * @@ -51,10 +51,10 @@ struct atm_pseudohdr { #define ATM_PH_FLAGS(X) ((X)->atm_ph[0]) #define ATM_PH_VPI(X) ((X)->atm_ph[1]) #define ATM_PH_VCI(X) ((((X)->atm_ph[2]) << 8) | ((X)->atm_ph[3])) -#define ATM_PH_SETVCI(X,V) { \ +#define ATM_PH_SETVCI(X,V) do { \ (X)->atm_ph[2] = ((V) >> 8) & 0xff; \ (X)->atm_ph[3] = ((V) & 0xff); \ -} +} while (/* CONSTCOND */0) #define ATM_PH_AAL5 0x01 /* use AAL5? (0 == aal0) */ #define ATM_PH_LLCSNAP 0x02 /* use the LLC SNAP encoding (iff aal5) */ @@ -89,10 +89,10 @@ struct atmllc { /* ATM_LLC macros: note type code in host byte order */ #define ATM_LLC_TYPE(X) (((X)->type[0] << 8) | ((X)->type[1])) -#define ATM_LLC_SETTYPE(X,V) { \ +#define ATM_LLC_SETTYPE(X,V) do { \ (X)->type[0] = ((V) >> 8) & 0xff; \ (X)->type[1] = ((V) & 0xff); \ -} +} while (/* CONSTCOND */0) #ifdef _KERNEL void atm_ifattach(struct ifnet *); diff --git a/sys/net/radix.h b/sys/net/radix.h index 9194ead7f13..60259b0fab1 100644 --- a/sys/net/radix.h +++ b/sys/net/radix.h @@ -1,4 +1,4 @@ -/* $OpenBSD: radix.h,v 1.14 2008/05/07 05:14:21 claudio Exp $ */ +/* $OpenBSD: radix.h,v 1.15 2008/11/07 19:09:03 deraadt Exp $ */ /* $NetBSD: radix.h,v 1.8 1996/02/13 22:00:37 christos Exp $ */ /* @@ -93,14 +93,18 @@ extern struct radix_mask { #define rm_mask rm_rmu.rmu_mask #define rm_leaf rm_rmu.rmu_leaf /* extra field would make 32 bytes */ -#define MKGet(m) {\ - if (rn_mkfreelist) {\ - m = rn_mkfreelist; \ - rn_mkfreelist = (m)->rm_mklist; \ - } else \ - R_Malloc(m, struct radix_mask *, sizeof (*(m))); }\ +#define MKGet(m) do { \ + if (rn_mkfreelist) { \ + m = rn_mkfreelist; \ + rn_mkfreelist = (m)->rm_mklist; \ + } else \ + R_Malloc(m, struct radix_mask *, sizeof (*(m))); \ +} while (0) -#define MKFree(m) { (m)->rm_mklist = rn_mkfreelist; rn_mkfreelist = (m);} +#define MKFree(m) do { \ + (m)->rm_mklist = rn_mkfreelist; \ + rn_mkfreelist = (m); \ +} while (0) struct radix_node_head { struct radix_node *rnh_treetop; diff --git a/sys/net/route.h b/sys/net/route.h index 49b4bed0ee9..51effca0d05 100644 --- a/sys/net/route.h +++ b/sys/net/route.h @@ -1,4 +1,4 @@ -/* $OpenBSD: route.h,v 1.52 2008/09/15 20:11:05 claudio Exp $ */ +/* $OpenBSD: route.h,v 1.53 2008/11/07 19:09:03 deraadt Exp $ */ /* $NetBSD: route.h,v 1.9 1996/02/13 22:00:49 christos Exp $ */ /* @@ -347,12 +347,12 @@ const char *rtlabel_id2name(u_int16_t); u_int16_t rtlabel_name2id(char *); void rtlabel_unref(u_int16_t); -#define RTFREE(rt) do { \ - if ((rt)->rt_refcnt <= 1) \ - rtfree(rt); \ - else \ - (rt)->rt_refcnt--; \ -} while (0) +#define RTFREE(rt) do { \ + if ((rt)->rt_refcnt <= 1) \ + rtfree(rt); \ + else \ + (rt)->rt_refcnt--; \ +} while (/* CONSTCOND */0) /* * Values for additional argument to rtalloc_noclone() and rtalloc2() |