X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/77fa97a8d7797e8dbc331b245316b22c657f83e2..a9c8816ff092f73c15a9f16ba665e158da99a1a0:/print-gre.c diff --git a/print-gre.c b/print-gre.c index 0b9e4423..f363f8b1 100644 --- a/print-gre.c +++ b/print-gre.c @@ -364,8 +364,7 @@ gre_sre_ip_print(netdissect_options *ndo, uint8_t sreoff, uint8_t srelen, } while (srelen != 0) { - if (!ND_TTEST_4(bp)) - return (0); + ND_TCHECK_4(bp); if (len < 4) return (0); @@ -378,6 +377,8 @@ gre_sre_ip_print(netdissect_options *ndo, uint8_t sreoff, uint8_t srelen, srelen -= 4; } return (1); +trunc: + return 0; } static int @@ -400,8 +401,7 @@ gre_sre_asn_print(netdissect_options *ndo, uint8_t sreoff, uint8_t srelen, } while (srelen != 0) { - if (!ND_TTEST_2(bp)) - return (0); + ND_TCHECK_2(bp); if (len < 2) return (0); @@ -413,4 +413,6 @@ gre_sre_asn_print(netdissect_options *ndo, uint8_t sreoff, uint8_t srelen, srelen -= 2; } return (1); +trunc: + return 0; }