dect
/
linux-2.6
Archived
13
0
Fork 0

gen_stats: 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:
David S. Miller 2012-04-01 20:47:35 -04:00
parent 0e3cea7b3c
commit 14ad6647f3
1 changed files with 2 additions and 1 deletions

View File

@ -27,7 +27,8 @@
static inline int
gnet_stats_copy(struct gnet_dump *d, int type, void *buf, int size)
{
NLA_PUT(d->skb, type, size, buf);
if (nla_put(d->skb, type, size, buf))
goto nla_put_failure;
return 0;
nla_put_failure: