From: Guy Harris Date: Thu, 14 Apr 2016 01:57:09 +0000 (-0700) Subject: Squelch a signed vs. unsigned comparison warning. X-Git-Tag: tcpdump-4.8.0~26 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/45a212f0a2292aabffbd60bf97d37a83c3117825 Squelch a signed vs. unsigned comparison warning. uint8_t + int constant = int; make the constant unsigned. --- diff --git a/print-fr.c b/print-fr.c index ff3fec66..3d2154da 100644 --- a/print-fr.c +++ b/print-fr.c @@ -851,10 +851,10 @@ q933_print(netdissect_options *ndo, if (ie_p->ie_type == 0 || ie_p->ie_len == 0) { return; } - if (length < ie_p->ie_len + 2) { + if (length < ie_p->ie_len + 2U) { goto trunc; } - ND_TCHECK2(*ptemp, ie_p->ie_len + 2); + ND_TCHECK2(*ptemp, ie_p->ie_len + 2U); if (fr_q933_print_ie_codeset[codeset] != NULL) { ie_is_known = fr_q933_print_ie_codeset[codeset](ndo, ie_p, ptemp); @@ -869,8 +869,8 @@ q933_print(netdissect_options *ndo, print_unknown_data(ndo, ptemp+2, "\n\t ", ie_p->ie_len); } - length -= ie_p->ie_len + 2; - ptemp += ie_p->ie_len + 2; + length -= ie_p->ie_len + 2U; + ptemp += ie_p->ie_len + 2U; } if (!ndo->ndo_vflag) { ND_PRINT((ndo, ", length %u", olen));