From: Francois-Xavier Le Bail Date: Sun, 15 Aug 2021 09:20:12 +0000 (+0200) Subject: Use more the ND_TCHECK_1() macro X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/f1c7ca5a7d5b39c0dd676437a6819f4328ebdb70 Use more the ND_TCHECK_1() macro This is a follow-up to 880b867ee73ae757faebbab13213c7d4079222a5. --- diff --git a/print-juniper.c b/print-juniper.c index e024b6be..ea6f3f9f 100644 --- a/print-juniper.c +++ b/print-juniper.c @@ -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;