summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1999-05-06 18:13:11 +0000
committerpeter <peter@FreeBSD.org>1999-05-06 18:13:11 +0000
commit73556bfee1b1d6dfc2a2f5d400228ca90bb34fc9 (patch)
treecd23f4c8f0d180abffffaece640b7971fd1103e2 /sys/net
parentff951279f971ed62682d7071d202a8e45e6e32a4 (diff)
downloadFreeBSD-src-73556bfee1b1d6dfc2a2f5d400228ca90bb34fc9.zip
FreeBSD-src-73556bfee1b1d6dfc2a2f5d400228ca90bb34fc9.tar.gz
Add sufficient braces to keep egcs happy about potentially ambiguous
if/else nesting.
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_tun.c4
-rw-r--r--sys/net/if_var.h12
-rw-r--r--sys/net/route.h12
3 files changed, 16 insertions, 12 deletions
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c
index 92c156d..181fa86 100644
--- a/sys/net/if_tun.c
+++ b/sys/net/if_tun.c
@@ -657,7 +657,7 @@ tunpoll(dev, events, p)
s = splimp();
TUNDEBUG("%s%d: tunpoll\n", ifp->if_name, ifp->if_unit);
- if (events & (POLLIN | POLLRDNORM))
+ if (events & (POLLIN | POLLRDNORM)) {
if (ifp->if_snd.ifq_len > 0) {
TUNDEBUG("%s%d: tunpoll q=%d\n", ifp->if_name,
ifp->if_unit, ifp->if_snd.ifq_len);
@@ -667,7 +667,7 @@ tunpoll(dev, events, p)
ifp->if_unit);
selrecord(p, &tp->tun_rsel);
}
-
+ }
if (events & (POLLOUT | POLLWRNORM))
revents |= events & (POLLOUT | POLLWRNORM);
diff --git a/sys/net/if_var.h b/sys/net/if_var.h
index d66aeb7..d8da636 100644
--- a/sys/net/if_var.h
+++ b/sys/net/if_var.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* From: @(#)if.h 8.1 (Berkeley) 6/10/93
- * $Id: if_var.h,v 1.10 1998/12/16 18:30:43 phk Exp $
+ * $Id: if_var.h,v 1.11 1999/04/16 21:22:46 peter Exp $
*/
#ifndef _NET_IF_VAR_H_
@@ -277,10 +277,12 @@ struct ifmultiaddr {
#ifdef KERNEL
#define IFAFREE(ifa) \
- if ((ifa)->ifa_refcnt <= 0) \
- ifafree(ifa); \
- else \
- (ifa)->ifa_refcnt--;
+ do { \
+ if ((ifa)->ifa_refcnt <= 0) \
+ ifafree(ifa); \
+ else \
+ (ifa)->ifa_refcnt--; \
+ } while (0)
extern struct ifnethead ifnet;
extern int ifqmaxlen;
diff --git a/sys/net/route.h b/sys/net/route.h
index 850d38e..f53e4e5 100644
--- a/sys/net/route.h
+++ b/sys/net/route.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)route.h 8.3 (Berkeley) 4/19/94
- * $Id: route.h,v 1.27 1997/09/07 05:26:27 bde Exp $
+ * $Id: route.h,v 1.28 1998/03/23 13:58:02 bde Exp $
*/
#ifndef _NET_ROUTE_H_
@@ -255,10 +255,12 @@ struct route_cb {
#ifdef KERNEL
#define RTFREE(rt) \
- if ((rt)->rt_refcnt <= 1) \
- rtfree(rt); \
- else \
- (rt)->rt_refcnt--;
+ do { \
+ if ((rt)->rt_refcnt <= 1) \
+ rtfree(rt); \
+ else \
+ (rt)->rt_refcnt--; \
+ } while (0)
extern struct route_cb route_cb;
extern struct radix_node_head *rt_tables[AF_MAX+1];
OpenPOWER on IntegriCloud