mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 02:19:51 +00:00
nf_conntrack_proto_generic: 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
242ddfc014
commit
f577694143
1 changed files with 2 additions and 1 deletions
|
@ -90,7 +90,8 @@ generic_timeout_obj_to_nlattr(struct sk_buff *skb, const void *data)
|
|||
{
|
||||
const unsigned int *timeout = data;
|
||||
|
||||
NLA_PUT_BE32(skb, CTA_TIMEOUT_GENERIC_TIMEOUT, htonl(*timeout / HZ));
|
||||
if (nla_put_be32(skb, CTA_TIMEOUT_GENERIC_TIMEOUT, htonl(*timeout / HZ)))
|
||||
goto nla_put_failure;
|
||||
|
||||
return 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue