summaryrefslogtreecommitdiff
path: root/print-gre.c
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2019-02-23 18:05:36 +0100
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2019-02-23 18:05:36 +0100
commita9c8816ff092f73c15a9f16ba665e158da99a1a0 (patch)
tree00c6d8c875ff63faa3ad5b7fc52904518446e7d1 /print-gre.c
parent77fa97a8d7797e8dbc331b245316b22c657f83e2 (diff)
downloadtcpdump-a9c8816ff092f73c15a9f16ba665e158da99a1a0.tar.gz
GRE: Replace the ND_TTEST_*() calls with ND_TCHECK_*() calls
Diffstat (limited to 'print-gre.c')
-rw-r--r--print-gre.c10
1 files changed, 6 insertions, 4 deletions
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;
}