From aff606920612ceedc6fa0716cdfcea0571d56987 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Fri, 23 Oct 2015 10:54:07 -0700 Subject: 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 735f1b18..3ee4c5a2 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. -- cgit v1.2.3