From: Francois-Xavier Le Bail Date: Mon, 20 Nov 2017 08:45:26 +0000 (+0100) Subject: Use more the EXTRACT_8BITS() macro to fetch a one-byte value (13/n) X-Git-Tag: tcpdump-4.99-bp~1745 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/aab874de55a27c00ba3b8759b14c032686fd6f14?hp=716e07e0602694c434414de78f278a2451ea92cf Use more the EXTRACT_8BITS() macro to fetch a one-byte value (13/n) In ND_PRINT() macro calls (step 2). --- diff --git a/print-ppp.c b/print-ppp.c index ba0fdc73..88e5792d 100644 --- a/print-ppp.c +++ b/print-ppp.c @@ -434,8 +434,9 @@ handle_ctrl_proto(netdissect_options *ndo, ND_PRINT((ndo, "%s (0x%02x), id %u, length %u", tok2str(cpcodes, "Unknown Opcode",code), code, - *tptr++, /* ID */ + EXTRACT_8BITS(tptr), /* ID */ length + 2)); + tptr++; if (!ndo->ndo_vflag) return;