]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Use more the ND_TCHECK_1() macro
authorFrancois-Xavier Le Bail <[email protected]>
Sun, 15 Aug 2021 09:20:12 +0000 (11:20 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Sun, 15 Aug 2021 11:01:54 +0000 (13:01 +0200)
This is a follow-up to 880b867ee73ae757faebbab13213c7d4079222a5.

print-juniper.c

index e024b6be7fb160251c36a02dfcd94e0ac745945c..ea6f3f9fe2b31fb3eb040ae993bee1071d3a4bea 100644 (file)
@@ -950,7 +950,7 @@ juniper_mfr_if_print(netdissect_options *ndo,
         switch (l2info.proto) {
         case (LLCSAP_ISONS<<8 | LLCSAP_ISONS):
             /* At least one byte is required */
-            ND_TCHECK_LEN(p, 1);
+            ND_TCHECK_1(p);
             isoclns_print(ndo, p + 1, l2info.length - 1);
             break;
         case (LLC_UI<<8 | NLPID_Q933):
@@ -1052,7 +1052,7 @@ juniper_atm1_if_print(netdissect_options *ndo,
 
         if (GET_U_1(p) == 0x03) { /* Cisco style NLPID encaps ? */
             /* At least one byte is required */
-            ND_TCHECK_LEN(p, 1);
+            ND_TCHECK_1(p);
             isoclns_print(ndo, p + 1, l2info.length - 1);
             /* FIXME check if frame was recognized */
             ndo->ndo_ll_hdr_len += l2info.header_len;
@@ -1121,7 +1121,7 @@ juniper_atm2_if_print(netdissect_options *ndo,
 
         if (GET_U_1(p) == 0x03) { /* Cisco style NLPID encaps ? */
             /* At least one byte is required */
-            ND_TCHECK_LEN(p, 1);
+            ND_TCHECK_1(p);
             isoclns_print(ndo, p + 1, l2info.length - 1);
             /* FIXME check if frame was recognized */
             ndo->ndo_ll_hdr_len += l2info.header_len;