]> The Tcpdump Group git mirrors - tcpdump/commitdiff
DHCPv6: Replace the (void)nd_printn() calls by nd_printjnp() calls
authorFrancois-Xavier Le Bail <[email protected]>
Sat, 12 Dec 2020 12:14:34 +0000 (13:14 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Sat, 12 Dec 2020 12:14:34 +0000 (13:14 +0100)
There is no null byte in the middle of these option values.

Remove an unnecessary cast.

print-dhcp6.c

index d3be3a5dc9ca883ddf2e6ec8be75a569c8375c18..699b728fbd9b9cb02e2e20a42bd29d7ace438369 100644 (file)
@@ -745,7 +745,7 @@ dhcp6opt_print(netdissect_options *ndo,
                                label_len = GET_U_1(tp);
                                tp++;
                                if (label_len < remain_len - 1) {
-                                       (void)nd_printn(ndo, tp, label_len, NULL);
+                                       nd_printjnp(ndo, tp, label_len);
                                        tp += label_len;
                                        remain_len -= (label_len + 1);
                                        if(GET_U_1(tp)) ND_PRINT(".");
@@ -765,7 +765,7 @@ dhcp6opt_print(netdissect_options *ndo,
                        }
                        tp = (const u_char *)(dh6o + 1);
                        ND_PRINT("=");
-                       (void)nd_printn(ndo, tp, (u_int)optlen, NULL);
+                       nd_printjnp(ndo, tp, optlen);
                        ND_PRINT(")");
                        break;