[NET]: Treat the sign of the result of skb_headroom() consistently
In some places, the result of skb_headroom() is compared to an unsigned integer, and in others, the result is compared to a signed integer. Make the comparisons consistent and correct. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
0ffdd58149
commit
c2636b4d9e
@@ -994,7 +994,7 @@ static inline int pskb_may_pull(struct sk_buff *skb, unsigned int len)
|
||||
*
|
||||
* Return the number of bytes of free space at the head of an &sk_buff.
|
||||
*/
|
||||
static inline int skb_headroom(const struct sk_buff *skb)
|
||||
static inline unsigned int skb_headroom(const struct sk_buff *skb)
|
||||
{
|
||||
return skb->data - skb->head;
|
||||
}
|
||||
@@ -1347,7 +1347,7 @@ static inline struct sk_buff *netdev_alloc_skb(struct net_device *dev,
|
||||
* Returns true if modifying the header part of the cloned buffer
|
||||
* does not requires the data to be copied.
|
||||
*/
|
||||
static inline int skb_clone_writable(struct sk_buff *skb, int len)
|
||||
static inline int skb_clone_writable(struct sk_buff *skb, unsigned int len)
|
||||
{
|
||||
return !skb_header_cloned(skb) &&
|
||||
skb_headroom(skb) + len <= skb->hdr_len;
|
||||
|
Reference in New Issue
Block a user