mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-05-14 06:00:02 +08:00
tcpdump: Remove superfluous static variable
This commit is contained in:
parent
d8a584df97
commit
c0776e69be
@ -635,9 +635,7 @@ print_attr_num(netdissect_options *ndo,
|
|||||||
/* This attribute has standard values */
|
/* This attribute has standard values */
|
||||||
if (attr_type[attr_code].siz_subtypes)
|
if (attr_type[attr_code].siz_subtypes)
|
||||||
{
|
{
|
||||||
static const char **table;
|
|
||||||
uint32_t data_value;
|
uint32_t data_value;
|
||||||
table = attr_type[attr_code].subtypes;
|
|
||||||
|
|
||||||
if ( (attr_code == TUNNEL_TYPE) || (attr_code == TUNNEL_MEDIUM) )
|
if ( (attr_code == TUNNEL_TYPE) || (attr_code == TUNNEL_MEDIUM) )
|
||||||
{
|
{
|
||||||
@ -655,7 +653,7 @@ print_attr_num(netdissect_options *ndo,
|
|||||||
if ( data_value <= (uint32_t)(attr_type[attr_code].siz_subtypes - 1 +
|
if ( data_value <= (uint32_t)(attr_type[attr_code].siz_subtypes - 1 +
|
||||||
attr_type[attr_code].first_subtype) &&
|
attr_type[attr_code].first_subtype) &&
|
||||||
data_value >= attr_type[attr_code].first_subtype )
|
data_value >= attr_type[attr_code].first_subtype )
|
||||||
ND_PRINT((ndo, "%s", table[data_value]));
|
ND_PRINT((ndo, "%s", attr_type[attr_code].subtypes[data_value]));
|
||||||
else
|
else
|
||||||
ND_PRINT((ndo, "#%u", data_value));
|
ND_PRINT((ndo, "#%u", data_value));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user