]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Make a never-negative variable a u_int.
authorGuy Harris <[email protected]>
Tue, 20 Sep 2016 09:00:55 +0000 (02:00 -0700)
committerGuy Harris <[email protected]>
Tue, 20 Sep 2016 09:00:55 +0000 (02:00 -0700)
That also lets us eliminate a cast.

print-fr.c

index a1ee84f7bf340f0027ef0e37b7fb4385f058550b..da1e18533916ed262d4312f65f31f16436b05099 100644 (file)
@@ -776,7 +776,7 @@ q933_print(netdissect_options *ndo,
        const u_char *ptemp = p;
        const struct ie_tlv_header_t  *ie_p;
         int olen;
-       int is_ansi = 0;
+       u_int is_ansi = 0;
         u_int codeset;
         u_int ie_is_known = 0;
 
@@ -812,7 +812,7 @@ q933_print(netdissect_options *ndo,
 
         olen = length; /* preserve the original length for non verbose mode */
 
-       if (length < (u_int)(2 + is_ansi)) {
+       if (length < 2 + is_ansi) {
                ND_PRINT((ndo, "[|q.933]"));
                return;
        }