aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2024-02-28 16:02:56 +0100
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2024-03-21 21:57:03 +0100
commitd999b12298977f29a742167de5187c70d9bb6d68 (patch)
treea29b75f351eab4c18fa5d71898b601cf00cfdb97
parent0e7622909c5ca4e329c1ab2d90ef7892b0dedab0 (diff)
downloadtcpdump-d999b12298977f29a742167de5187c70d9bb6d68.tar.gz
802.15.4: Replace '> 0' with '!= 0' in some unsigned expression tests
Unsigned is always >= 0, so '> 0' and '!= 0' are identical. This makes the tests a little clearer. (cherry picked from commit f9ea99305fb0dbf02d1c1638c606ec26a0c78dad)
-rw-r--r--print-802_15_4.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/print-802_15_4.c b/print-802_15_4.c
index 8853d44f..05e19de5 100644
--- a/print-802_15_4.c
+++ b/print-802_15_4.c
@@ -1299,7 +1299,7 @@ ieee802_15_4_print_mlme_ie_list(netdissect_options *ndo,
ND_PRINT("] ");
p += sub_ie_len;
ie_len -= 2 + sub_ie_len;
- } while (ie_len > 0);
+ } while (ie_len != 0);
}
/*
@@ -1502,7 +1502,7 @@ ieee802_15_4_print_payload_ie_list(netdissect_options *ndo,
if (group_id == 0xf) {
break;
}
- } while (caplen > 0);
+ } while (caplen != 0);
return len;
}