Skip to content

Commit

Permalink
skbuff: make skb_put_zero() return void
Browse files Browse the repository at this point in the history
It's nicer to return void, since then there's no need to
cast to any structures. Currently none of the users have
a cast, but a number of future conversions do.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Johannes Berg authored and David S. Miller committed Jun 15, 2017
1 parent 108ea51 commit 83ad357
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/linux/skbuff.h
Original file line number Diff line number Diff line change
Expand Up @@ -1904,9 +1904,9 @@ static inline unsigned char *__skb_put(struct sk_buff *skb, unsigned int len)
return tmp;
}

static inline unsigned char *skb_put_zero(struct sk_buff *skb, unsigned int len)
static inline void *skb_put_zero(struct sk_buff *skb, unsigned int len)
{
unsigned char *tmp = skb_put(skb, len);
void *tmp = skb_put(skb, len);

memset(tmp, 0, len);

Expand Down

0 comments on commit 83ad357

Please sign in to comment.