mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04: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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
0e74008b66
commit
aa9f979c41
7 changed files with 8 additions and 14 deletions
|
|
@ -1043,8 +1043,7 @@ static struct sk_buff *pn533_alloc_poll_tg_frame(struct pn533 *dev)
|
|||
get_random_bytes(felica + 2, 6);
|
||||
|
||||
/* NFCID3 */
|
||||
nfcid3 = skb_put(skb, 10);
|
||||
memset(nfcid3, 0, 10);
|
||||
nfcid3 = skb_put_zero(skb, 10);
|
||||
memcpy(nfcid3, felica, 8);
|
||||
|
||||
/* General bytes */
|
||||
|
|
|
|||
Loading…
Reference in a new issue