Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/netstat PR/50873: David Binderman: use logical or in...



details:   https://anonhg.NetBSD.org/src/rev/456430f25fb1
branches:  trunk
changeset: 343878:456430f25fb1
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Feb 29 18:19:46 2016 +0000

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

diffstat:

 usr.bin/netstat/vtw.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (54 lines):

diff -r e44b1104947b -r 456430f25fb1 usr.bin/netstat/vtw.c
--- a/usr.bin/netstat/vtw.c     Mon Feb 29 18:18:04 2016 +0000
+++ b/usr.bin/netstat/vtw.c     Mon Feb 29 18:19:46 2016 +0000
@@ -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 @@
                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 @@
        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 @@
                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 @@
        base = fat_tcpv6.base;
        lim = fat_tcpv6.lim;
 
-       if (!base | !lim)
+       if (!base || !lim)
                goto end;
 
        mem += (lim - base + 1) * sizeof(*base);



Home | Main Index | Thread Index | Old Index