summaryrefslogtreecommitdiff
path: root/print-m3ua.c
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2017-12-11 12:46:51 +0100
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2017-12-11 22:11:01 +0100
commit84ef17ac0eecb3efc11a63c3f2c578ae78732c02 (patch)
treec62632ddf7ae57a999a89938ecaf8e590bfcc019 /print-m3ua.c
parent264ed29aae3407c1a6816c64813806a077ccebcb (diff)
downloadtcpdump-84ef17ac0eecb3efc11a63c3f2c578ae78732c02.tar.gz
Replace ND_TTEST2()/ND_TCHECK2() macros by macros using pointers (1/n)
ND_TTEST2(var, l) -> ND_TTEST_LEN(p, l) ND_TCHECK2(var, l) -> ND_TCHECK_LEN(p, l)
Diffstat (limited to 'print-m3ua.c')
-rw-r--r--print-m3ua.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/print-m3ua.c b/print-m3ua.c
index 163b6450..c50ed0d4 100644
--- a/print-m3ua.c
+++ b/print-m3ua.c
@@ -219,19 +219,19 @@ tag_value_print(netdissect_options *ndo,
/* buf and size don't include the header */
if (size < 4)
goto invalid;
- ND_TCHECK2(*buf, size);
+ ND_TCHECK_LEN(buf, size);
ND_PRINT((ndo, "0x%08x", EXTRACT_BE_U_4(buf)));
break;
/* ... */
default:
ND_PRINT((ndo, "(length %u)", size + (u_int)sizeof(struct m3ua_param_header)));
- ND_TCHECK2(*buf, size);
+ ND_TCHECK_LEN(buf, size);
}
return;
invalid:
ND_PRINT((ndo, "%s", istr));
- ND_TCHECK2(*buf, size);
+ ND_TCHECK_LEN(buf, size);
return;
trunc:
ND_PRINT((ndo, "%s", tstr));
@@ -260,7 +260,7 @@ m3ua_tags_print(netdissect_options *ndo,
while (p < buf + size) {
if (p + sizeof(struct m3ua_param_header) > buf + size)
goto invalid;
- ND_TCHECK2(*p, sizeof(struct m3ua_param_header));
+ ND_TCHECK_LEN(p, sizeof(struct m3ua_param_header));
/* Parameter Tag */
hdr_tag = EXTRACT_BE_U_2(p);
ND_PRINT((ndo, "\n\t\t\t%s: ", tok2str(ParamName, "Unknown Parameter (0x%04x)", hdr_tag)));
@@ -271,7 +271,7 @@ m3ua_tags_print(netdissect_options *ndo,
/* Parameter Value */
align = (p + hdr_len - buf) % 4;
align = align ? 4 - align : 0;
- ND_TCHECK2(*p, hdr_len + align);
+ ND_TCHECK_LEN(p, hdr_len + align);
tag_value_print(ndo, p, hdr_tag, hdr_len - sizeof(struct m3ua_param_header));
p += hdr_len + align;
}
@@ -279,7 +279,7 @@ m3ua_tags_print(netdissect_options *ndo,
invalid:
ND_PRINT((ndo, "%s", istr));
- ND_TCHECK2(*buf, size);
+ ND_TCHECK_LEN(buf, size);
return;
trunc:
ND_PRINT((ndo, "%s", tstr));
@@ -332,7 +332,7 @@ m3ua_print(netdissect_options *ndo,
invalid:
ND_PRINT((ndo, "%s", istr));
- ND_TCHECK2(*buf, size);
+ ND_TCHECK_LEN(buf, size);
return;
trunc:
ND_PRINT((ndo, "%s", tstr));