Module Name:    src
Committed By:   christos
Date:           Mon Feb 29 18:19:46 UTC 2016

Modified Files:
        src/usr.bin/netstat: vtw.c

Log Message:
PR/50873: David Binderman: use logical or instead of arithmetic


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/netstat/vtw.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/netstat/vtw.c
diff -u src/usr.bin/netstat/vtw.c:1.8 src/usr.bin/netstat/vtw.c:1.9
--- src/usr.bin/netstat/vtw.c:1.8	Tue Jun 16 18:54:10 2015
+++ src/usr.bin/netstat/vtw.c	Mon Feb 29 13:19:46 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: vtw.c,v 1.8 2015/06/16 22:54:10 christos Exp $	*/
+/*	$NetBSD: vtw.c,v 1.9 2016/02/29 18:19:46 christos Exp $	*/
 
 /*
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
 #if 0
 static char sccsid[] = "from: @(#)inet.c	8.4 (Berkeley) 4/20/94";
 #else
-__RCSID("$NetBSD: vtw.c,v 1.8 2015/06/16 22:54:10 christos Exp $");
+__RCSID("$NetBSD: vtw.c,v 1.9 2016/02/29 18:19:46 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -269,7 +269,7 @@ show_vtw_v4(void (*print)(const vtw_t *)
 		kbase = vtw_tcpv4[i].base.v4;
 		klim = vtw_tcpv4[i].lim.v4;
 
-		if (!kbase | !klim)
+		if (!kbase || !klim)
 			continue;
 
 		n = (klim - kbase + 1);
@@ -300,7 +300,7 @@ show_vtw_v4(void (*print)(const vtw_t *)
 	base = fat_tcpv4.base;
 	lim = fat_tcpv4.lim;
 
-	if (!base | !lim)
+	if (!base || !lim)
 		goto end;
 
 	mem += (lim - base + 1) * sizeof(*base);
@@ -369,7 +369,7 @@ show_vtw_v6(void (*print)(const vtw_t *)
 		kbase = vtw_tcpv6[i].base.v6;
 		klim = vtw_tcpv6[i].lim.v6;
 
-		if (!kbase | !klim)
+		if (!kbase || !klim)
 			continue;
 
 		n = (klim - kbase + 1);
@@ -399,7 +399,7 @@ show_vtw_v6(void (*print)(const vtw_t *)
 	base = fat_tcpv6.base;
 	lim = fat_tcpv6.lim;
 
-	if (!base | !lim)
+	if (!base || !lim)
 		goto end;
 
 	mem += (lim - base + 1) * sizeof(*base);

Reply via email to