aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/skbuff.h
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2007-10-24 00:07:32 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-24 00:27:55 -0400
commitc2636b4d9e8ab8d16b9e2bf0f0744bb8418d4026 (patch)
tree4db39ee9b93871385d72e776bec2e640166e3b34 /include/linux/skbuff.h
parent0ffdd581497286e8af529b0b39770c01eab15b30 (diff)
[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>
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r--include/linux/skbuff.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index fd4e12f24270..94e49915a8c0 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -994,7 +994,7 @@ static inline int pskb_may_pull(struct sk_buff *skb, unsigned int len)
994 * 994 *
995 * Return the number of bytes of free space at the head of an &sk_buff. 995 * Return the number of bytes of free space at the head of an &sk_buff.
996 */ 996 */
997static inline int skb_headroom(const struct sk_buff *skb) 997static inline unsigned int skb_headroom(const struct sk_buff *skb)
998{ 998{
999 return skb->data - skb->head; 999 return skb->data - skb->head;
1000} 1000}
@@ -1347,7 +1347,7 @@ static inline struct sk_buff *netdev_alloc_skb(struct net_device *dev,
1347 * Returns true if modifying the header part of the cloned buffer 1347 * Returns true if modifying the header part of the cloned buffer
1348 * does not requires the data to be copied. 1348 * does not requires the data to be copied.
1349 */ 1349 */
1350static inline int skb_clone_writable(struct sk_buff *skb, int len) 1350static inline int skb_clone_writable(struct sk_buff *skb, unsigned int len)
1351{ 1351{
1352 return !skb_header_cloned(skb) && 1352 return !skb_header_cloned(skb) &&
1353 skb_headroom(skb) + len <= skb->hdr_len; 1353 skb_headroom(skb) + len <= skb->hdr_len;