summaryrefslogtreecommitdiff
path: root/print-pppoe.c
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2017-12-09 17:15:55 +0100
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2017-12-10 11:40:35 +0100
commit6bb65331a5f9d35186238af0ed736a3949616bc2 (patch)
tree0a444da5c885e8a62952429175c8fb74a0caa426 /print-pppoe.c
parent07ac438e08e5ffed3539e10d78f1cfc7d221d591 (diff)
downloadtcpdump-6bb65331a5f9d35186238af0ed736a3949616bc2.tar.gz
Use more the EXTRACT_U_1() macro (53/n)
Assignment, p[n], (more)
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 9c4fdfa7..18baba9c 100644
--- a/print-pppoe.c
+++ b/print-pppoe.c
@@ -104,8 +104,8 @@ 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);
- pppoe_ver = (pppoe_packet[0] & 0xF0) >> 4;
- pppoe_type = (pppoe_packet[0] & 0x0F);
+ 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);
pppoe_sessionid = EXTRACT_BE_U_2(pppoe_packet + 2);
pppoe_length = EXTRACT_BE_U_2(pppoe_packet + 4);