diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2000-02-02 17:14:37 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2000-02-02 17:14:37 +0000 |
commit | 6dbfa5790df49b345a7ac351f0efb65b9dad30ef (patch) | |
tree | e4d2544c623ce4cc1f80ee74e0a6fa85ed751ae4 | |
parent | 325599da8b1f97a69dd3d1a17923aaae8abaadd0 (diff) |
wrap IFAFREE() by "do {} while (0)". it wasn't safe enough.
-rw-r--r-- | sys/net/if.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/net/if.h b/sys/net/if.h index 9c4c29acb00..422b48dae05 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if.h,v 1.14 1999/12/08 06:50:17 itojun Exp $ */ +/* $OpenBSD: if.h,v 1.15 2000/02/02 17:14:36 itojun Exp $ */ /* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */ /* @@ -376,12 +376,13 @@ __END_DECLS #include <net/if_arp.h> #ifdef _KERNEL -#define IFAFREE(ifa) { \ +#define IFAFREE(ifa) \ +do { \ if ((ifa)->ifa_refcnt <= 0) \ ifafree(ifa); \ else \ (ifa)->ifa_refcnt--; \ - } +} while (0) struct ifnet_head ifnet; struct ifnet **ifindex2ifnet; |