[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20071102191426.30464.7490.stgit@manray.1015granger.net>
Date: Fri, 02 Nov 2007 15:14:26 -0400
From: Chuck Lever <chuck.lever@...cle.com>
To: netdev@...r.kernel.org
Subject: [PATCH] NET: Remove unneeded type cast in skb_truesize_check()
The (int) type cast in skb_truesize_check() is unneeded: without it, all
the variable types in the conditional expression are unsigned integers. As
it stands, the type cast causes a comparison between a signed and an
unsigned integer, which can produce unexpected results.
Signed-off-by: Chuck Lever <chuck.lever@...cle.com>
---
include/linux/skbuff.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 94e4991..7965216 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -387,7 +387,7 @@ extern void skb_truesize_bug(struct sk_buff *skb);
static inline void skb_truesize_check(struct sk_buff *skb)
{
- if (unlikely((int)skb->truesize < sizeof(struct sk_buff) + skb->len))
+ if (unlikely(skb->truesize < sizeof(struct sk_buff) + skb->len))
skb_truesize_bug(skb);
}
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists