mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
networking: use skb_put_zero()
Use the recently introduced helper to replace the pattern of skb_put() && memset(), this transformation was done with the following spatch: @@ identifier p; expression len; expression skb; @@ -p = skb_put(skb, len); -memset(p, 0, len); +p = skb_put_zero(skb, len); Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
0e74008b66
commit
aa9f979c41
@@ -400,8 +400,7 @@ void *__nla_reserve_nohdr(struct sk_buff *skb, int attrlen)
|
||||
{
|
||||
void *start;
|
||||
|
||||
start = skb_put(skb, NLA_ALIGN(attrlen));
|
||||
memset(start, 0, NLA_ALIGN(attrlen));
|
||||
start = skb_put_zero(skb, NLA_ALIGN(attrlen));
|
||||
|
||||
return start;
|
||||
}
|
||||
|
Reference in New Issue
Block a user