]> The Tcpdump Group git mirrors - tcpdump/commitdiff
UDLD: Fix "Unchecked return value" found by Coverity
authorFrancois-Xavier Le Bail <[email protected]>
Thu, 26 Nov 2015 15:45:42 +0000 (16:45 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Thu, 26 Nov 2015 15:47:14 +0000 (16:47 +0100)
The bounds check is already done before by ND_TCHECK2(*tptr, len).
So we are deliberately ignoring the return value of fn_printn with last
argument NULL (no bounds check).

print-udld.c

index 22a3487f4fdb9daa2ed4aa8668951c452eafee79..0dc10d3c62a9c4d70a97a2f798f183ad6beebe1e 100644 (file)
@@ -158,7 +158,7 @@ udld_print (netdissect_options *ndo, const u_char *pptr, u_int length)
 
         case UDLD_ECHO_TLV:
             ND_PRINT((ndo, ", "));
-            fn_printn(ndo, tptr, len, NULL);
+            (void)fn_printn(ndo, tptr, len, NULL);
             break;
 
         case UDLD_MESSAGE_INTERVAL_TLV: