summaryrefslogtreecommitdiff
path: root/print-zeromq.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-zeromq.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-zeromq.c')
-rw-r--r--print-zeromq.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/print-zeromq.c b/print-zeromq.c
index cfab5878..2cf9d6c3 100644
--- a/print-zeromq.c
+++ b/print-zeromq.c
@@ -79,9 +79,8 @@ zmtp1_print_frame(netdissect_options *ndo, const u_char *cp, const u_char *ep)
uint8_t flags;
ND_PRINT("\n\t");
- ND_TCHECK_1(cp); /* length/0xFF */
- if (GET_U_1(cp) != 0xFF) {
+ if (GET_U_1(cp) != 0xFF) { /* length/0xFF */
header_len = 1; /* length */
body_len_declared = GET_U_1(cp);
ND_PRINT(" frame flags+body (8-bit) length %" PRIu64, body_len_declared);
@@ -171,7 +170,6 @@ zmtp1_print_intermediate_part(netdissect_options *ndo, const u_char *cp, const u
u_int frame_offset;
u_int remaining_len;
- ND_TCHECK_2(cp);
frame_offset = GET_BE_U_2(cp);
ND_PRINT("\n\t frame offset 0x%04x", frame_offset);
cp += 2;