aboutsummaryrefslogtreecommitdiff
path: root/toys
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-10-23 10:54:07 -0700
committerRob Landley <rob@landley.net>2015-10-25 02:15:41 -0500
commitaff606920612ceedc6fa0716cdfcea0571d56987 (patch)
tree2540c73ed4c87e5c125c1a3f0fe1b0d4566eb8b2 /toys
parent71d87c9ecff852dbc115135c8ad38d40169f2726 (diff)
downloadtoybox-aff606920612ceedc6fa0716cdfcea0571d56987.tar.gz
Fix netstat build warnings.
Fixes two instances of "warning: use of logical '&&' with constant operand". Change-Id: I2bb1ba4e389f8a9e54af8ee3ab23d8849fc329f0
Diffstat (limited to 'toys')
-rw-r--r--toys/pending/netstat.c4
1 files 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.