diff options
Diffstat (limited to 'sys/net/radix.h')
-rw-r--r-- | sys/net/radix.h | 20 |
1 files changed, 12 insertions, 8 deletions
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; |