summaryrefslogtreecommitdiff
path: root/print-vtp.c
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2017-11-21 21:53:35 +0100
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2017-11-21 22:23:47 +0100
commitcb9b66505924ae735e5ef772a434e72089231076 (patch)
tree47df75adb4f99b60e9ba6755ff2bb9c65de41429 /print-vtp.c
parentfe1c2f0d7fb9221936b0d54a670b9f2eea2b72c4 (diff)
downloadtcpdump-cb9b66505924ae735e5ef772a434e72089231076.tar.gz
Use more the EXTRACT_8BITS() macro to fetch a one-byte value (18/n)
Assignment, *(p op e) Partial list.
Diffstat (limited to 'print-vtp.c')
-rw-r--r--print-vtp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/print-vtp.c b/print-vtp.c
index 0c07293a..fbde2c36 100644
--- a/print-vtp.c
+++ b/print-vtp.c
@@ -130,7 +130,7 @@ vtp_print (netdissect_options *ndo,
ND_TCHECK2(*tptr, VTP_HEADER_LEN);
- type = *(tptr+1);
+ type = EXTRACT_8BITS(tptr + 1);
ND_PRINT((ndo, "VTPv%u, Message %s (0x%02x), length %u",
*tptr,
tok2str(vtp_message_type_values,"Unknown message type", type),
@@ -144,7 +144,7 @@ vtp_print (netdissect_options *ndo,
/* verbose mode print all fields */
ND_PRINT((ndo, "\n\tDomain name: "));
- mgmtd_len = *(tptr + 3);
+ mgmtd_len = EXTRACT_8BITS(tptr + 3);
if (mgmtd_len < 1 || mgmtd_len > 32) {
ND_PRINT((ndo, " [invalid MgmtD Len %d]", mgmtd_len));
return;
@@ -288,7 +288,7 @@ vtp_print (netdissect_options *ndo,
goto trunc;
ND_TCHECK2(*tptr, 2);
type = *tptr;
- tlv_len = *(tptr+1);
+ tlv_len = EXTRACT_8BITS(tptr + 1);
ND_PRINT((ndo, "\n\t\t%s (0x%04x) TLV",
tok2str(vtp_vlan_tlv_values, "Unknown", type),