]> The Tcpdump Group git mirrors - tcpdump/commitdiff
IP6OPTS: Use more ND_TCHECK_n() macros
authorFrancois-Xavier Le Bail <[email protected]>
Sun, 7 Jan 2018 22:46:14 +0000 (23:46 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Sun, 7 Jan 2018 22:46:14 +0000 (23:46 +0100)
print-ip6opts.c

index 8448d905d8fc37af9e203a62dd7b6589b8818a43..9510cf59d0bacbeaac78b2c06e14f23b0388e6ab 100644 (file)
@@ -176,7 +176,7 @@ hbhopt_print(netdissect_options *ndo, const u_char *bp)
     const struct ip6_hbh *dp = (const struct ip6_hbh *)bp;
     u_int hbhlen = 0;
 
-    ND_TCHECK(dp->ip6h_len);
+    ND_TCHECK_1(dp->ip6h_len);
     hbhlen = (EXTRACT_U_1(dp->ip6h_len) + 1) << 3;
     ND_TCHECK_LEN(dp, hbhlen);
     ND_PRINT("HBH ");
@@ -196,7 +196,7 @@ dstopt_print(netdissect_options *ndo, const u_char *bp)
     const struct ip6_dest *dp = (const struct ip6_dest *)bp;
     u_int dstoptlen = 0;
 
-    ND_TCHECK(dp->ip6d_len);
+    ND_TCHECK_1(dp->ip6d_len);
     dstoptlen = (EXTRACT_U_1(dp->ip6d_len) + 1) << 3;
     ND_TCHECK_LEN(dp, dstoptlen);
     ND_PRINT("DSTOPT ");