summaryrefslogtreecommitdiff
path: root/print-atm.c
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2020-08-10 16:22:37 +0200
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2020-09-05 14:59:21 +0200
commit929e4be621ebdcede37865a5767a175f083f9138 (patch)
treebf6ecbc038696e66176b2d50e04e015767f23b3d /print-atm.c
parent54b5db3dde658894be730b15480f9b6e27b717a0 (diff)
downloadtcpdump-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-atm.c')
-rw-r--r--print-atm.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/print-atm.c b/print-atm.c
index 33a5cafa..4e19366a 100644
--- a/print-atm.c
+++ b/print-atm.c
@@ -353,14 +353,12 @@ sig_print(netdissect_options *ndo,
{
uint32_t call_ref;
- ND_TCHECK_1(p + PROTO_POS);
if (GET_U_1(p + PROTO_POS) == Q2931) {
/*
* protocol:Q.2931 for User to Network Interface
* (UNI 3.1) signalling
*/
ND_PRINT("Q.2931");
- ND_TCHECK_1(p + MSG_TYPE_POS);
ND_PRINT(":%s ",
tok2str(msgtype2str, "msgtype#%u", GET_U_1(p + MSG_TYPE_POS)));
@@ -376,10 +374,6 @@ sig_print(netdissect_options *ndo,
/* SSCOP with some unknown protocol atop it */
ND_PRINT("SSCOP, proto %u ", GET_U_1(p + PROTO_POS));
}
- return;
-
-trunc:
- nd_print_trunc(ndo);
}
/*
@@ -547,7 +541,6 @@ oam_print(netdissect_options *ndo,
}
/* crc10 checksum verification */
- ND_TCHECK_2(p + OAM_CELLTYPE_FUNCTYPE_LEN + OAM_FUNCTION_SPECIFIC_LEN);
cksum = GET_BE_U_2(p + OAM_CELLTYPE_FUNCTYPE_LEN + OAM_FUNCTION_SPECIFIC_LEN)
& OAM_CRC10_MASK;
cksum_shouldbe = verify_crc10_cksum(0, p, OAM_PAYLOAD_LEN);