From: Heiner Kallweit Date: Sun, 6 Oct 2019 16:19:54 +0000 (+0200) Subject: net: core: change return type of pskb_may_pull to bool X-Git-Tag: v5.5-rc1~174^2~400 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b9df4fd7e99cb8bfd80c4143f3045d63b1754ad0;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: David S. Miller --- diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 4351577b14d70..0a58402a166e3 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; }