]> The Tcpdump Group git mirrors - tcpdump/commitdiff
CLNP: Squelch a cppcheck warning (GH #629)
authorDenis Ovsienko <[email protected]>
Mon, 30 Jul 2018 13:08:03 +0000 (14:08 +0100)
committerDenis Ovsienko <[email protected]>
Mon, 30 Jul 2018 13:08:03 +0000 (14:08 +0100)
See also commit f944e1e39.

[print-isoclns.c:906] -> [print-isoclns.c:910]: (warning) Opposite inner
'if' condition leads to a dead code block.

[skip ci]

print-isoclns.c

index 241d6087e912698e9a4e3f35adbc8f16aea64dd4..b9935ebd2f2cea5675e413d2d26527b07e2255cf 100644 (file)
@@ -903,7 +903,7 @@ clnp_print(netdissect_options *ndo,
         }
 
         /* now walk the options */
-        while (li_remaining >= 2) {
+        while (li_remaining != 0) {
             u_int op, opli;
             const uint8_t *tptr;