diff options
author | Jiri Pirko <jiri@resnulli.us> | 2014-12-09 16:23:29 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-12-09 21:49:58 -0500 |
commit | 6ea3b446b9369c971bcab2a723d814d2295c77d3 (patch) | |
tree | cd245bff2e8eec5a08909211399f1c88ade08ef4 /net/sched/cls_fw.c | |
parent | f9c5c62db1c9bc20f396c3527b5074c4e7f1c275 (diff) |
net: sched: cls: use nla_nest_cancel instead of nlmsg_trim
To cancel nesting, this function is more convenient.
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/cls_fw.c')
-rw-r--r-- | net/sched/cls_fw.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/sched/cls_fw.c b/net/sched/cls_fw.c index 23fda2ac0d19..a5269f76004c 100644 --- a/net/sched/cls_fw.c +++ b/net/sched/cls_fw.c | |||
@@ -356,7 +356,6 @@ static int fw_dump(struct net *net, struct tcf_proto *tp, unsigned long fh, | |||
356 | { | 356 | { |
357 | struct fw_head *head = rtnl_dereference(tp->root); | 357 | struct fw_head *head = rtnl_dereference(tp->root); |
358 | struct fw_filter *f = (struct fw_filter *)fh; | 358 | struct fw_filter *f = (struct fw_filter *)fh; |
359 | unsigned char *b = skb_tail_pointer(skb); | ||
360 | struct nlattr *nest; | 359 | struct nlattr *nest; |
361 | 360 | ||
362 | if (f == NULL) | 361 | if (f == NULL) |
@@ -397,7 +396,7 @@ static int fw_dump(struct net *net, struct tcf_proto *tp, unsigned long fh, | |||
397 | return skb->len; | 396 | return skb->len; |
398 | 397 | ||
399 | nla_put_failure: | 398 | nla_put_failure: |
400 | nlmsg_trim(skb, b); | 399 | nla_nest_cancel(skb, nest); |
401 | return -1; | 400 | return -1; |
402 | } | 401 | } |
403 | 402 | ||