Kris Katterjohn wrote:
This localizes a variable to the function it's used in.
Signed-off-by: Kris Katterjohn <[EMAIL PROTECTED]>
I assume tmp was used for a reason instead of using a variable local to the if()
in load_pointer(), but I can't figure out why. So I wrote this patch changing it
in case it was just a mistake or something left over from something else.
So in other words, can you explain to me why it was done the way it was done? If
not, I think my patch takes care of it.
Also, I tested it my way and everything seems to be working quite well.
Thanks!
--- x/net/core/filter.c 2006-01-06 16:51:51.000000000 -0600
+++ y/net/core/filter.c 2006-01-06 18:17:43.000000000 -0600
@@ -51,12 +51,12 @@ static void *__load_pointer(struct sk_bu
return NULL;
}
-static inline void *load_pointer(struct sk_buff *skb, int k,
- unsigned int size, void *buffer)
+static inline void *load_pointer(struct sk_buff *skb, int k, unsigned int size)
{
- if (k >= 0)
+ if (k >= 0) {
+ u32 *buffer = NULL;
return skb_header_pointer(skb, k, size, buffer);
This is wrong, skb_header_pointer needs a pointer to a buffer
to which it can copy the packet contents if they are located
in the non-linear area.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html