]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
checkpatch: fix continuation detection when handling spacing on operators
authorAndy Whitcroft <apw@canonical.com>
Tue, 6 Jan 2009 22:41:27 +0000 (14:41 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 6 Jan 2009 23:59:17 +0000 (15:59 -0800)
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 <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/checkpatch.pl

index d80b55a6f89b08ca657984c69001baa12763a076..67b0c9faa32d9f1da19cee2cd7be38895d0bb789 100755 (executable)
@@ -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';
                                }