]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Use more the EXTRACT_U_1() macro to fetch a one-byte value (24/n)
authorFrancois-Xavier Le Bail <[email protected]>
Thu, 23 Nov 2017 14:23:12 +0000 (15:23 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Thu, 23 Nov 2017 14:23:12 +0000 (15:23 +0100)
In bittok2str() calls (step 3).

print-stp.c

index 0fe292fd1dfa5da807ddc226e4d9fe6d9f51715a..79b297add76bd0f93a7013a168e2a720282a36c0 100644 (file)
@@ -319,7 +319,7 @@ stp_print_mstp_bpdu(netdissect_options *ndo, const struct stp_bpdu_ *stp_bpdu,
             msti = msti & 0x0FFF;
 
             ND_PRINT((ndo, "\n\tMSTI %d, Flags [%s], port-role %s",
-                   msti, bittok2str(stp_bpdu_flag_values, "none", ptr[offset]),
+                   msti, bittok2str(stp_bpdu_flag_values, "none", EXTRACT_U_1(ptr + offset)),
                    tok2str(rstp_obj_port_role_values, "Unknown",
                            RSTP_EXTRACT_PORT_ROLE(ptr[offset]))));
             ND_PRINT((ndo, "\n\t\tMSTI regional-root-id %s, pathcost %u",