Use skb_put_zero() instead of hand-writing it. This saves a few lines of
code and is more readable.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
{
struct rmnet_map_header *map_header;
u32 padding, map_datalen;
- u8 *padbytes;
map_datalen = skb->len - hdrlen;
map_header = (struct rmnet_map_header *)
if (skb_tailroom(skb) < padding)
return NULL;
- padbytes = (u8 *)skb_put(skb, padding);
- memset(padbytes, 0, padding);
+ skb_put_zero(skb, padding);
done:
map_header->pkt_len = htons(map_datalen + padding);