diff options
author | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2017-12-09 11:40:36 +0100 |
---|---|---|
committer | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2017-12-09 11:46:15 +0100 |
commit | 1cfd6cd2ac8acecbcf16e083a6cd272a19ec994e (patch) | |
tree | 0b4481667ad1bab77665e54d07f787c8244c633e /print-cdp.c | |
parent | ef3437c081dd78bd51fad6ed0d6af58dcfaabd69 (diff) | |
download | tcpdump-1cfd6cd2ac8acecbcf16e083a6cd272a19ec994e.tar.gz |
Use more the EXTRACT_U_1() macro (51/n)
Moreover: Use more the ND_ISPRINT() macro.
Diffstat (limited to 'print-cdp.c')
-rw-r--r-- | print-cdp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/print-cdp.c b/print-cdp.c index 908f55f4..0c594843 100644 --- a/print-cdp.c +++ b/print-cdp.c @@ -304,7 +304,8 @@ cdp_print_addr(netdissect_options *ndo, goto trunc; al = EXTRACT_BE_U_2(p + pl); /* address length */ - if (pt == PT_NLPID && pl == 1 && *p == NLPID_IP && al == 4) { + if (pt == PT_NLPID && pl == 1 && EXTRACT_U_1(p) == NLPID_IP && + al == 4) { /* * IPv4: protocol type = NLPID, protocol length = 1 * (1-byte NLPID), protocol = 0xcc (NLPID for IPv4), |