From: Francois-Xavier Le Bail Date: Fri, 1 Dec 2017 22:08:23 +0000 (+0100) Subject: Use more the EXTRACT_U_1() macro (41/n) X-Git-Tag: tcpdump-4.99-bp~1686 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/d2def296e94a50e74c3ada4002cdfba116688c11 Use more the EXTRACT_U_1() macro (41/n) In: switch (... *(p) ...) ... --- diff --git a/print-dccp.c b/print-dccp.c index 3c6435ba..0e541793 100644 --- a/print-dccp.c +++ b/print-dccp.c @@ -576,7 +576,7 @@ static int dccp_print_option(netdissect_options *ndo, const u_char *option, u_in } } else { ND_PRINT((ndo, "%s", tok2str(dccp_option_values, "Option %u", EXTRACT_U_1(option)))); - switch (*option) { + switch (EXTRACT_U_1(option)) { case 32: case 33: case 34: diff --git a/print-isoclns.c b/print-isoclns.c index e4bc6941..f0e6ee58 100644 --- a/print-isoclns.c +++ b/print-isoclns.c @@ -680,7 +680,7 @@ isoclns_print(netdissect_options *ndo, const uint8_t *p, u_int length) if (ndo->ndo_eflag) ND_PRINT((ndo, "OSI NLPID %s (0x%02x): ", tok2str(nlpid_values, "Unknown", EXTRACT_U_1(p)), EXTRACT_U_1(p))); - switch (*p) { + switch (EXTRACT_U_1(p)) { case NLPID_CLNP: if (!clnp_print(ndo, p, length)) diff --git a/print-mpls.c b/print-mpls.c index 9d773214..2b287e79 100644 --- a/print-mpls.c +++ b/print-mpls.c @@ -134,7 +134,7 @@ mpls_print(netdissect_options *ndo, const u_char *bp, u_int length) /* nothing to print */ return; } - switch(*p) { + switch(EXTRACT_U_1(p)) { case 0x45: case 0x46: