From: Guy Harris Date: Tue, 20 Sep 2016 09:00:55 +0000 (-0700) Subject: Make a never-negative variable a u_int. X-Git-Tag: tcpdump-4.9.0-bp~173 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/e175de6b8c086923429aeb81143a98b666c35dea Make a never-negative variable a u_int. That also lets us eliminate a cast. --- diff --git a/print-fr.c b/print-fr.c index a1ee84f7..da1e1853 100644 --- a/print-fr.c +++ b/print-fr.c @@ -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; }