Use more the EXTRACT_U_1() macro (41/n)

In: switch (... *(p) ...) ...
This commit is contained in:
Francois-Xavier Le Bail 2017-12-01 23:08:23 +01:00
parent d7b497cac7
commit d2def296e9
3 changed files with 3 additions and 3 deletions

View File

@ -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:

View File

@ -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))

View File

@ -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: