summaryrefslogtreecommitdiff
path: root/print-krb.c
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2020-09-05 19:40:32 +0200
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2020-09-06 20:22:29 +0200
commitabc8c2d61c65757011d9d32abb01cd1e51232f3a (patch)
treea4c9890086314bffc5236c815c773975e471cc4a /print-krb.c
parent54b5db3dde658894be730b15480f9b6e27b717a0 (diff)
downloadtcpdump-abc8c2d61c65757011d9d32abb01cd1e51232f3a.tar.gz
Remove many (762) now redundant ND_TCHECK_n() calls
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-krb.c')
-rw-r--r--print-krb.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/print-krb.c b/print-krb.c
index 41a6126a..c6c2fe7d 100644
--- a/print-krb.c
+++ b/print-krb.c
@@ -168,8 +168,6 @@ krb4_print(netdissect_options *ndo,
kp = (const struct krb *)cp;
- ND_TCHECK_1(kp->type);
-
type = GET_U_1(kp->type) & (0xFF << 1);
ND_PRINT(" %s %s: ",
@@ -181,7 +179,6 @@ krb4_print(netdissect_options *ndo,
if ((cp = krb4_print_hdr(ndo, cp)) == NULL)
return;
cp += 4; /* ctime */
- ND_TCHECK_1(cp);
ND_PRINT(" %umin ", GET_U_1(cp) * 5);
cp++;
PRINT;
@@ -191,14 +188,11 @@ krb4_print(netdissect_options *ndo,
case AUTH_MSG_APPL_REQUEST:
cp += 2;
- ND_TCHECK_1(cp);
ND_PRINT("v%u ", GET_U_1(cp));
cp++;
PRINT;
- ND_TCHECK_1(cp);
ND_PRINT(" (%u)", GET_U_1(cp));
cp++;
- ND_TCHECK_1(cp);
ND_PRINT(" (%u)", GET_U_1(cp));
break;