Skip to content

Commit

Permalink
net: core: change return type of pskb_may_pull to bool
Browse files Browse the repository at this point in the history
This function de-facto returns a bool, so let's change the return type
accordingly.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Heiner Kallweit authored and David S. Miller committed Oct 7, 2019
1 parent 6c157f6 commit b9df4fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/linux/skbuff.h
Original file line number Diff line number Diff line change
Expand Up @@ -2261,12 +2261,12 @@ static inline void *pskb_pull(struct sk_buff *skb, unsigned int len)
return unlikely(len > skb->len) ? NULL : __pskb_pull(skb, len);
}

static inline int pskb_may_pull(struct sk_buff *skb, unsigned int len)
static inline bool pskb_may_pull(struct sk_buff *skb, unsigned int len)
{
if (likely(len <= skb_headlen(skb)))
return 1;
return true;
if (unlikely(len > skb->len))
return 0;
return false;
return __pskb_pull_tail(skb, len - skb_headlen(skb)) != NULL;
}

Expand Down

0 comments on commit b9df4fd

Please sign in to comment.