diff options
author | Johannes Berg <johannes.berg@intel.com> | 2016-10-26 15:44:33 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-10-29 22:01:01 +0300 |
commit | 4700e9ce6ed8526a14e6cf9d7e319f675c16d0a7 (patch) | |
tree | cf12ae4a9fea43cf637b4ae8dc64b523891c1b9d /net/sched | |
parent | 166e6045cacccb3046883a1a4c977f173fec5ccd (diff) | |
download | linux-4700e9ce6ed8526a14e6cf9d7e319f675c16d0a7.tar.xz |
net_sched actions: use nla_parse_nested()
Use nla_parse_nested instead of open-coding the call to
nla_parse() with the attribute data/len.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/act_api.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/sched/act_api.c b/net/sched/act_api.c index a512b18c0088..f893d180da1c 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c @@ -1028,8 +1028,7 @@ static struct nlattr *find_dump_kind(const struct nlmsghdr *n) if (tb[1] == NULL) return NULL; - if (nla_parse(tb2, TCA_ACT_MAX, nla_data(tb[1]), - nla_len(tb[1]), NULL) < 0) + if (nla_parse_nested(tb2, TCA_ACT_MAX, tb[1], NULL) < 0) return NULL; kind = tb2[TCA_ACT_KIND]; |