From: Jiri Pirko Date: Fri, 4 Aug 2017 12:29:03 +0000 (+0200) Subject: net: sched: use tcf_exts_has_actions instead of exts->nr_actions X-Git-Tag: v4.14-rc1~130^2~373^2~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=978dfd8d14a503d20be1f1e2ae328c3eac675a2d;p=thirdparty%2Fkernel%2Flinux.git net: sched: use tcf_exts_has_actions instead of exts->nr_actions For check in tcf_exts_dump use tcf_exts_has_actions helper instead of exts->nr_actions for checking if there are any actions present. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller --- diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 287ae6cbf73bf..735d556a52831 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -915,7 +915,7 @@ int tcf_exts_dump(struct sk_buff *skb, struct tcf_exts *exts) #ifdef CONFIG_NET_CLS_ACT struct nlattr *nest; - if (exts->action && exts->nr_actions) { + if (exts->action && tcf_exts_has_actions(exts)) { /* * again for backward compatible mode - we want * to work with both old and new modes of entering