]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Discard result of fn_printn() calls.
authorGuy Harris <[email protected]>
Tue, 17 Jan 2017 09:01:46 +0000 (01:01 -0800)
committerFrancois-Xavier Le Bail <[email protected]>
Wed, 18 Jan 2017 08:16:42 +0000 (09:16 +0100)
We've already done checks to see whether we'll run past the end of the
packet, so there's no need to see whether fn_printn() did so.

Squelches some Coverity complaints.

print-dhcp6.c
print-lldp.c

index 78b82ee3ed783ea02de7aeae3913dcb3238ca6b4..762d9187eb0b12cd79c8a46226460198c216fd9b 100644 (file)
@@ -732,7 +732,7 @@ dhcp6opt_print(netdissect_options *ndo,
                        while (remain_len && *tp) {
                                label_len =  *tp++;
                                if (label_len < remain_len - 1) {
-                                       fn_printn(ndo, tp, label_len, NULL);
+                                       (void)fn_printn(ndo, tp, label_len, NULL);
                                        tp += label_len;
                                        remain_len -= (label_len + 1);
                                        if(*tp) ND_PRINT((ndo, "."));
@@ -752,7 +752,7 @@ dhcp6opt_print(netdissect_options *ndo,
                        }
                        tp = (const u_char *)(dh6o + 1);
                        ND_PRINT((ndo, "="));
-                       fn_printn(ndo, tp, (u_int)optlen, NULL);
+                       (void)fn_printn(ndo, tp, (u_int)optlen, NULL);
                        ND_PRINT((ndo, ")"));
                        break;
 
index ed89ec1b137a8bed4e4b88b66d14ee9d3fc5c312..730b36f5720978d68d85710547903cd038c2fa63 100644 (file)
@@ -945,7 +945,7 @@ lldp_private_iana_print(netdissect_options *ndo,
     switch (subtype) {
     case LLDP_IANA_SUBTYPE_MUDURL:
         ND_PRINT((ndo, "\n\t  MUD-URL="));
-        fn_printn(ndo, tptr+4, tlv_len-4, NULL);
+        (void)fn_printn(ndo, tptr+4, tlv_len-4, NULL);
         break;
     default:
         hexdump=TRUE;