pkt_sched: Stop using NLA_PUT*().
These macros contain a hidden goto, and are thus extremely error prone and make code hard to audit. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -284,7 +284,8 @@ static int multiq_dump(struct Qdisc *sch, struct sk_buff *skb)
|
||||
opt.bands = q->bands;
|
||||
opt.max_bands = q->max_bands;
|
||||
|
||||
NLA_PUT(skb, TCA_OPTIONS, sizeof(opt), &opt);
|
||||
if (nla_put(skb, TCA_OPTIONS, sizeof(opt), &opt))
|
||||
goto nla_put_failure;
|
||||
|
||||
return skb->len;
|
||||
|
||||
|
Reference in New Issue
Block a user