Subject: Re: [PATCH] [IPv6]: Invalid semicolon after if statement

From: Dave Jones <[email-masked]>
Date: Wed, 15 Aug 2007 19:52:20 -0400

On Wed, Aug 15, 2007 at 03:08:14PM -0700, David Miller wrote:
 > From: "Ilpo_Järvinen" <[email-masked]>
 > Date: Thu, 16 Aug 2007 00:57:00 +0300 (EEST)
 > 
 > > A similar fix to netfilter from Eric Dumazet inspired me to
 > > look around a bit by using some grep/sed stuff as looking for
 > > this kind of bugs seemed easy to automate. This is one of them
 > > I found where it looks like this semicolon is not valid.
 > > 
 > > Signed-off-by: Ilpo Järvinen <[email-masked]>
 > 
 > Yikes!  Makes you want to audit the entire tree for these
 > things :-)))
 
Indeed.  Here's another one.

Signed-off-by: Dave Jones <[email-masked]>

diff --git a/net/netfilter/xt_u32.c b/net/netfilter/xt_u32.c
index 74f9b14..bec4279 100644
--- a/net/netfilter/xt_u32.c
+++ b/net/netfilter/xt_u32.c
@@ -36,7 +36,7 @@ static bool u32_match_it(const struct xt_u32 *data,
 		at  = 0;
 		pos = ct->location[0].number;
 
-		if (skb->len < 4 || pos > skb->len - 4);
+		if (skb->len < 4 || pos > skb->len - 4)
 			return false;
 
 		ret   = skb_copy_bits(skb, pos, &n, sizeof(n));

-- 
http://www.codemonkey.org.uk