summaryrefslogtreecommitdiff
path: root/print-ipx.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-ipx.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-ipx.c')
-rw-r--r--print-ipx.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/print-ipx.c b/print-ipx.c
index 24d92096..9609c708 100644
--- a/print-ipx.c
+++ b/print-ipx.c
@@ -77,7 +77,6 @@ ipx_print(netdissect_options *ndo, const u_char *p, u_int length)
if (!ndo->ndo_eflag)
ND_PRINT("IPX ");
- ND_TCHECK_2(ipx->srcSkt);
ND_PRINT("%s.%04x > ",
ipxaddr_string(ndo, GET_BE_U_4(ipx->srcNet), ipx->srcNode),
GET_BE_U_2(ipx->srcSkt));
@@ -87,7 +86,6 @@ ipx_print(netdissect_options *ndo, const u_char *p, u_int length)
GET_BE_U_2(ipx->dstSkt));
/* take length from ipx header */
- ND_TCHECK_2(ipx->length);
length = GET_BE_U_2(ipx->length);
if (length < ipxSize) {
@@ -96,9 +94,6 @@ ipx_print(netdissect_options *ndo, const u_char *p, u_int length)
return;
}
ipx_decode(ndo, ipx, p + ipxSize, length - ipxSize);
- return;
-trunc:
- nd_print_trunc(ndo);
}
static const char *
@@ -159,7 +154,6 @@ ipx_sap_print(netdissect_options *ndo, const u_char *ipx, u_int length)
{
int command, i;
- ND_TCHECK_2(ipx);
command = GET_BE_U_2(ipx);
ipx += 2;
length -= 2;
@@ -172,7 +166,6 @@ ipx_sap_print(netdissect_options *ndo, const u_char *ipx, u_int length)
else
ND_PRINT("ipx-sap-nearest-req");
- ND_TCHECK_2(ipx);
ND_PRINT(" %s", ipxsap_string(ndo, htons(GET_BE_U_2(ipx))));
break;
@@ -236,7 +229,6 @@ ipx_rip_print(netdissect_options *ndo, const u_char *ipx, u_int length)
{
int command, i;
- ND_TCHECK_2(ipx);
command = GET_BE_U_2(ipx);
ipx += 2;
length -= 2;