diff mbox series

[net-next] net: core: change return type of pskb_may_pull to bool

Message ID 8c993693-cbef-e401-bfc3-c2a915621c51@gmail.com
State Accepted
Delegated to: David Miller
Headers show
Series [net-next] net: core: change return type of pskb_may_pull to bool | expand

Commit Message

Heiner Kallweit Oct. 6, 2019, 4:19 p.m. UTC
This function de-facto returns a bool, so let's change the return type
accordingly.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 include/linux/skbuff.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

David Miller Oct. 7, 2019, 1:37 p.m. UTC | #1
From: Heiner Kallweit <hkallweit1@gmail.com>
Date: Sun, 6 Oct 2019 18:19:54 +0200

> This function de-facto returns a bool, so let's change the return type
> accordingly.
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

Applied.
diff mbox series

Patch

diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 4351577b1..0a58402a1 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;
 }