summaryrefslogtreecommitdiff
path: root/print-pppoe.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-pppoe.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-pppoe.c')
-rw-r--r--print-pppoe.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/print-pppoe.c b/print-pppoe.c
index 18baba9c..b2efcc32 100644
--- a/print-pppoe.c
+++ b/print-pppoe.c
@@ -103,7 +103,7 @@ pppoe_print(netdissect_options *ndo, register const u_char *bp, u_int length)
}
length -= PPPOE_HDRLEN;
pppoe_packet = bp;
- ND_TCHECK2(*pppoe_packet, PPPOE_HDRLEN);
+ ND_TCHECK_LEN(pppoe_packet, PPPOE_HDRLEN);
pppoe_ver = (EXTRACT_U_1(pppoe_packet) & 0xF0) >> 4;
pppoe_type = (EXTRACT_U_1(pppoe_packet) & 0x0F);
pppoe_code = EXTRACT_U_1(pppoe_packet + 1);
@@ -154,7 +154,7 @@ pppoe_print(netdissect_options *ndo, register const u_char *bp, u_int length)
unsigned tag_str_len = 0;
/* TODO print UTF-8 decoded text */
- ND_TCHECK2(*p, tag_len);
+ ND_TCHECK_LEN(p, tag_len);
for (v = p; v < p + tag_len && tag_str_len < MAXTAGPRINT-1; v++)
if (ND_ISPRINT(EXTRACT_U_1(v))) {
tag_str[tag_str_len++] = EXTRACT_U_1(v);