diff options
author | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2020-08-10 16:22:37 +0200 |
---|---|---|
committer | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2020-09-05 14:59:21 +0200 |
commit | 929e4be621ebdcede37865a5767a175f083f9138 (patch) | |
tree | bf6ecbc038696e66176b2d50e04e015767f23b3d /print-rsvp.c | |
parent | 54b5db3dde658894be730b15480f9b6e27b717a0 (diff) | |
download | tcpdump-test-rc.tar.gz |
Remove many (761) redundant ND_TCHECK_n() callstest-rc
ND_TCHECK_n(e), n in { 1, 2, 3, 4, 8 }.
They are redundant because they are followed by a GET_.*_n(e) call,
same n, same e, which do the bounds check.
Remove unused 'trunc' labels and most associated codes.
Update the outputs of some tests accordingly.
Diffstat (limited to 'print-rsvp.c')
-rw-r--r-- | print-rsvp.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/print-rsvp.c b/print-rsvp.c index e7754d32..23b6d5a7 100644 --- a/print-rsvp.c +++ b/print-rsvp.c @@ -520,9 +520,7 @@ rsvp_intserv_print(netdissect_options *ndo, if (obj_tlen < 4) return 0; - ND_TCHECK_1(tptr); parameter_id = GET_U_1(tptr); - ND_TCHECK_2(tptr + 2); parameter_length = GET_BE_U_2(tptr + 2)<<2; /* convert wordcount to bytecount */ ND_PRINT("\n\t Parameter ID: %s (%u), length: %u, Flags: [0x%02x]", @@ -544,7 +542,6 @@ rsvp_intserv_print(netdissect_options *ndo, * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */ if (parameter_length == 4) { - ND_TCHECK_4(tptr + 4); ND_PRINT("\n\t\tIS hop count: %u", GET_BE_U_4(tptr + 4)); } break; @@ -558,7 +555,6 @@ rsvp_intserv_print(netdissect_options *ndo, * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */ if (parameter_length == 4) { - ND_TCHECK_4(tptr + 4); bw.i = GET_BE_U_4(tptr + 4); ND_PRINT("\n\t\tPath b/w estimate: %.10g Mbps", bw.f / 125000); } @@ -573,7 +569,6 @@ rsvp_intserv_print(netdissect_options *ndo, * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */ if (parameter_length == 4) { - ND_TCHECK_4(tptr + 4); ND_PRINT("\n\t\tMinimum path latency: "); if (GET_BE_U_4(tptr + 4) == 0xffffffff) ND_PRINT("don't care"); @@ -592,7 +587,6 @@ rsvp_intserv_print(netdissect_options *ndo, * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */ if (parameter_length == 4) { - ND_TCHECK_4(tptr + 4); ND_PRINT("\n\t\tComposed MTU: %u bytes", GET_BE_U_4(tptr + 4)); } break; @@ -652,7 +646,6 @@ rsvp_intserv_print(netdissect_options *ndo, case 135: case 136: if (parameter_length == 4) { - ND_TCHECK_4(tptr + 4); ND_PRINT("\n\t\tValue: %u", GET_BE_U_4(tptr + 4)); } break; |