nlattr: use print_xlat
* nlattr.c (print_nlattr): Use print_xlat for printing NLA_F_NESTED and NLA_F_NET_BYTEORDER named constants.
This commit is contained in:
12
nlattr.c
12
nlattr.c
@ -60,10 +60,14 @@ print_nlattr(const struct nlattr *const nla,
|
||||
"wrong NLA_TYPE_MASK");
|
||||
|
||||
tprintf("{nla_len=%u, nla_type=", nla->nla_len);
|
||||
if (nla->nla_type & NLA_F_NESTED)
|
||||
tprints("NLA_F_NESTED|");
|
||||
if (nla->nla_type & NLA_F_NET_BYTEORDER)
|
||||
tprints("NLA_F_NET_BYTEORDER|");
|
||||
if (nla->nla_type & NLA_F_NESTED) {
|
||||
print_xlat(NLA_F_NESTED);
|
||||
tprints("|");
|
||||
}
|
||||
if (nla->nla_type & NLA_F_NET_BYTEORDER) {
|
||||
print_xlat(NLA_F_NET_BYTEORDER);
|
||||
tprints("|");
|
||||
}
|
||||
printxval(table, nla->nla_type & NLA_TYPE_MASK, dflt);
|
||||
tprints("}");
|
||||
}
|
||||
|
Reference in New Issue
Block a user