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-radius.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-radius.c')
-rw-r--r-- | print-radius.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/print-radius.c b/print-radius.c index 8c33438f..5c27710a 100644 --- a/print-radius.c +++ b/print-radius.c @@ -845,7 +845,6 @@ print_vendor_attr(netdissect_options *ndo, if (length < 4) goto trunc; - ND_TCHECK_4(data); vendor_id = GET_BE_U_4(data); data+=4; length-=4; @@ -1302,17 +1301,11 @@ print_attr_time(netdissect_options *ndo, return; } - ND_TCHECK_4(data); - attr_time = GET_BE_U_4(data); strlcpy(string, ctime(&attr_time), sizeof(string)); /* Get rid of the newline */ string[24] = '\0'; ND_PRINT("%.24s", string); - return; - - trunc: - nd_print_trunc(ndo); } static void @@ -1386,13 +1379,11 @@ print_attr_strange(netdissect_options *ndo, ND_PRINT("ERROR: length %u != 14", length); return; } - ND_TCHECK_1(data); if (GET_U_1(data)) ND_PRINT("User can change password"); else ND_PRINT("User cannot change password"); data++; - ND_TCHECK_1(data); ND_PRINT(", Min password length: %u", GET_U_1(data)); data++; ND_PRINT(", created at: "); @@ -1426,7 +1417,6 @@ print_attr_strange(netdissect_options *ndo, ND_PRINT("Error: length %u != 4", length); return; } - ND_TCHECK_4(data); error_cause_value = GET_BE_U_4(data); ND_PRINT("Error cause %u: %s", error_cause_value, tok2str(errorcausetype, "Error-Cause %u not known", error_cause_value)); |