mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-20 05:43:09 +00:00
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:
parent
9360ffd185
commit
1b34ec43c9
40 changed files with 263 additions and 157 deletions
|
@ -257,8 +257,9 @@ static int basic_dump(struct tcf_proto *tp, unsigned long fh,
|
|||
if (nest == NULL)
|
||||
goto nla_put_failure;
|
||||
|
||||
if (f->res.classid)
|
||||
NLA_PUT_U32(skb, TCA_BASIC_CLASSID, f->res.classid);
|
||||
if (f->res.classid &&
|
||||
nla_put_u32(skb, TCA_BASIC_CLASSID, f->res.classid))
|
||||
goto nla_put_failure;
|
||||
|
||||
if (tcf_exts_dump(skb, &f->exts, &basic_ext_map) < 0 ||
|
||||
tcf_em_tree_dump(skb, &f->ematches, TCA_BASIC_EMATCHES) < 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue