i'm sure i've sent this a couple of times before, but i can't find it in my mail. (which doesn't mean much, gmail search being what it is.)
-- Elliott Hughes - http://who/enh - http://jessies.org/~enh/ Android native code/tools questions? Mail me/drop by/add me as a reviewer.
From 47625fffb38fe216e53e9bfca7f980b32547c72d Mon Sep 17 00:00:00 2001 From: Elliott Hughes <[email protected]> Date: Fri, 23 Oct 2015 10:54:07 -0700 Subject: [PATCH] Fix netstat build warnings. Fixes two instances of "warning: use of logical '&&' with constant operand". Change-Id: I2bb1ba4e389f8a9e54af8ee3ab23d8849fc329f0 --- toys/pending/netstat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toys/pending/netstat.c b/toys/pending/netstat.c index 735f1b1..3ee4c5a 100644 --- a/toys/pending/netstat.c +++ b/toys/pending/netstat.c @@ -161,10 +161,10 @@ static void show_data(unsigned rport, char *label, unsigned rxq, unsigned txq, unsigned long inode) { if (toys.optflags & FLAG_l) { - if (!rport && (state && 0xA)) display_data(rport, label, rxq, txq, lip, rip, state, uid, inode); + if (!rport && (state & 0xA)) display_data(rport, label, rxq, txq, lip, rip, state, uid, inode); } else if (toys.optflags & FLAG_a) display_data(rport, label, rxq, txq, lip, rip, state, uid, inode); //rport && (TCP | UDP | RAW) - else if (rport && (0x10 | 0x20 | 0x40)) display_data(rport, label, rxq, txq, lip, rip, state, uid, inode); + else if (rport & (0x10 | 0x20 | 0x40)) display_data(rport, label, rxq, txq, lip, rip, state, uid, inode); } /* * used to get service name. -- 2.6.0.rc2.230.g3dd15c0
_______________________________________________ Toybox mailing list [email protected] http://lists.landley.net/listinfo.cgi/toybox-landley.net
