diff options
author | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2017-11-27 18:38:56 +0100 |
---|---|---|
committer | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2017-11-27 20:57:24 +0100 |
commit | f085c93f59fb2332e09f3da20eef5fb2bbd04431 (patch) | |
tree | b3b4364a44ce79355b3e559b1470493e4aaefafc /print-cdp.c | |
parent | 99227bf55234b457b8e5ac39992a6db6db388939 (diff) | |
download | tcpdump-f085c93f59fb2332e09f3da20eef5fb2bbd04431.tar.gz |
Use more the EXTRACT_U_1() macro (31/n)
In ND_PRINT() macro call(s) (step 9).
*(p)
Diffstat (limited to 'print-cdp.c')
-rw-r--r-- | print-cdp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/print-cdp.c b/print-cdp.c index fcdd63dc..908f55f4 100644 --- a/print-cdp.c +++ b/print-cdp.c @@ -202,7 +202,7 @@ cdp_print(netdissect_options *ndo, case 0x0b: /* Duplex - CDPv2 */ if (len < 1) goto trunc; - ND_PRINT((ndo, "%s", *(tptr) ? "full": "half")); + ND_PRINT((ndo, "%s", EXTRACT_U_1(tptr) ? "full": "half")); break; /* http://www.cisco.com/c/en/us/td/docs/voice_ip_comm/cata/186/2_12_m/english/release/notes/186rn21m.html @@ -224,12 +224,12 @@ cdp_print(netdissect_options *ndo, case 0x12: /* AVVID trust bitmap - not documented */ if (len < 1) goto trunc; - ND_PRINT((ndo, "0x%02x", *(tptr))); + ND_PRINT((ndo, "0x%02x", EXTRACT_U_1(tptr))); break; case 0x13: /* AVVID untrusted port CoS - not documented */ if (len < 1) goto trunc; - ND_PRINT((ndo, "0x%02x", *(tptr))); + ND_PRINT((ndo, "0x%02x", EXTRACT_U_1(tptr))); break; case 0x14: /* System Name - not documented */ ND_PRINT((ndo, "'")); @@ -243,7 +243,7 @@ cdp_print(netdissect_options *ndo, case 0x17: /* Physical Location - not documented */ if (len < 1) goto trunc; - ND_PRINT((ndo, "0x%02x", *(tptr))); + ND_PRINT((ndo, "0x%02x", EXTRACT_U_1(tptr))); if (len > 1) { ND_PRINT((ndo, "/")); (void)fn_printn(ndo, tptr + 1, len - 1, NULL); |