]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Squelch a compiler warning.
authorGuy Harris <[email protected]>
Fri, 26 Apr 2019 21:28:16 +0000 (14:28 -0700)
committerGuy Harris <[email protected]>
Fri, 26 Apr 2019 21:28:16 +0000 (14:28 -0700)
All hail the integer promotions, which stick signedness into the middle
of otherwise-unsigned expressions!

print-ldp.c

index 19e87b7f718960d4815cb6e53007b61040b3e23b..680a7e1e8fc135824dc746e4f367f0c7a83bc579 100644 (file)
@@ -253,7 +253,7 @@ ldp_tlv_print(netdissect_options *ndo,
     ldp_tlv_header = (const struct ldp_tlv_header *)tptr;
     ND_TCHECK_SIZE(ldp_tlv_header);
     tlv_len=GET_BE_U_2(ldp_tlv_header->length);
-    if (tlv_len + 4 > msg_tlen) {
+    if (tlv_len + 4U > msg_tlen) {
         ND_PRINT("\n\t\t TLV contents go past end of message");
         return 0;
     }