summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>2002-08-08 14:00:25 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>2002-08-08 14:00:25 +0000
commitce784ec239d2f9ed35c9396fdd1ea4c97eff1ee8 (patch)
tree02b318b51d0b8efff0919680ae757d48dbf86fcb /sbin
parenta2705548511bc2760105bd44edb9810721b98b84 (diff)
Use & to test if bits are set, not &&; art@ ok.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/routed/if.c6
-rw-r--r--sbin/routed/parms.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/sbin/routed/if.c b/sbin/routed/if.c
index d722852dbb5..150651f411f 100644
--- a/sbin/routed/if.c
+++ b/sbin/routed/if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.c,v 1.6 1997/07/30 23:28:40 deraadt Exp $ */
+/* $OpenBSD: if.c,v 1.7 2002/08/08 14:00:24 aaron Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -36,7 +36,7 @@
#if !defined(lint)
static char sccsid[] = "@(#)if.c 8.1 (Berkeley) 6/5/93";
#else
-static char rcsid[] = "$OpenBSD: if.c,v 1.6 1997/07/30 23:28:40 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: if.c,v 1.7 2002/08/08 14:00:24 aaron Exp $";
#endif
#include "defs.h"
@@ -1105,7 +1105,7 @@ addrouteforif(struct interface *ifp)
/* If we are going to send packets to the gateway,
* it must be reachable using our physical interfaces
*/
- if (!(ifp->int_state && IS_EXTERNAL)
+ if (!(ifp->int_state & IS_EXTERNAL)
&& !rtfind(ifp->int_dstaddr)
&& ifp->int_transitions == 0) {
msglog("unreachable gateway %s in "
diff --git a/sbin/routed/parms.c b/sbin/routed/parms.c
index 18c305705d5..994810f7e88 100644
--- a/sbin/routed/parms.c
+++ b/sbin/routed/parms.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parms.c,v 1.6 1997/07/30 23:28:43 deraadt Exp $ */
+/* $OpenBSD: parms.c,v 1.7 2002/08/08 14:00:24 aaron Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -515,11 +515,11 @@ check_parms(struct parm *new)
|| (0 != (new->parm_int_state & GROUP_IS_SOL)
&& 0 != (parmp->parm_int_state & GROUP_IS_SOL)
&& 0 != ((new->parm_int_state ^ parmp->parm_int_state)
- && GROUP_IS_SOL))
+ & GROUP_IS_SOL))
|| (0 != (new->parm_int_state & GROUP_IS_ADV)
&& 0 != (parmp->parm_int_state & GROUP_IS_ADV)
&& 0 != ((new->parm_int_state ^ parmp->parm_int_state)
- && GROUP_IS_ADV))
+ & GROUP_IS_ADV))
|| (new->parm_rdisc_pref != 0
&& parmp->parm_rdisc_pref != 0
&& new->parm_rdisc_pref != parmp->parm_rdisc_pref)