summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2013-04-28 08:23:28 (GMT)
committerThomas Graf <tgraf@suug.ch>2013-04-28 08:23:28 (GMT)
commitc07a6a30c2c3219795aada01ade65c09e8fb41a3 (patch)
tree0ca94e4488866f0a811ad5496b8ee72d69dcffdd
parentead4cdeb99029c6cf3bf85811c3ea32346b41b03 (diff)
downloadlibnl-c07a6a30c2c3219795aada01ade65c09e8fb41a3.zip
libnl-c07a6a30c2c3219795aada01ade65c09e8fb41a3.tar.gz
libnl-c07a6a30c2c3219795aada01ade65c09e8fb41a3.tar.bz2
attr: nla_is_nested() must access nla_type directly
Can't used nla_type() as it applies NLA_TYPE_MASK first Signed-off-by: Thomas Graf <tgraf@suug.ch>
-rw-r--r--lib/attr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/attr.c b/lib/attr.c
index e6efe4e..14552c6 100644
--- a/lib/attr.c
+++ b/lib/attr.c
@@ -899,7 +899,7 @@ int nla_parse_nested(struct nlattr *tb[], int maxtype, struct nlattr *nla,
*/
int nla_is_nested(struct nlattr *attr)
{
- return !!(nla_type(attr) & NLA_F_NESTED);
+ return !!(nla->nla_type & NLA_F_NESTED);
}
/** @} */