From: Andy Whitcroft Date: Tue, 6 Jan 2009 22:41:27 +0000 (-0800) Subject: checkpatch: fix continuation detection when handling spacing on operators X-Git-Tag: v2.6.29-rc1~340 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=8b1b33786b06a222cf3430b1bf942a3681532104;p=linux-2.6-omap-h63xx.git checkpatch: fix continuation detection when handling spacing on operators We are miscategorising a continuation fragment following an operator which may lead to us thinking that there is a space after it when there is not. Fix this up. Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index d80b55a6f89..67b0c9faa32 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -1793,7 +1793,7 @@ sub process { $c = 'C' if ($elements[$n + 2] =~ /^$;/); $c = 'B' if ($elements[$n + 2] =~ /^(\)|\]|;)/); $c = 'O' if ($elements[$n + 2] eq ''); - $c = 'E' if ($elements[$n + 2] =~ /\s*\\$/); + $c = 'E' if ($elements[$n + 2] =~ /^\s*\\$/); } else { $c = 'E'; }