aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/skbuff.h
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2019-10-06 18:19:54 +0200
committerDavid S. Miller <davem@davemloft.net>2019-10-07 09:36:26 -0400
commitb9df4fd7e99cb8bfd80c4143f3045d63b1754ad0 (patch)
tree711d18a50f451f046a57515d0cabedc9a65072f2 /include/linux/skbuff.h
parentMerge branch 'ena-set_channels' (diff)
downloadlinux-dev-b9df4fd7e99cb8bfd80c4143f3045d63b1754ad0.tar.xz
linux-dev-b9df4fd7e99cb8bfd80c4143f3045d63b1754ad0.zip
net: core: change return type of pskb_may_pull to bool
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>
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r--include/linux/skbuff.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 4351577b14d7..0a58402a166e 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -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;
}