mirror of
https://github.com/the-tcpdump-group/tcpdump.git
synced 2024-11-23 18:14:29 +08:00
Use more the EXTRACT_U_1() macro (41/n)
In: switch (... *(p) ...) ...
This commit is contained in:
parent
d7b497cac7
commit
d2def296e9
@ -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:
|
||||
|
@ -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))
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user