Commit 8b1b33786b06a222cf3430b1bf942a3681532104
Committed by
Linus Torvalds
1 parent
8054576dca
Exists in
master
and in
4 other branches
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 <apw@canonical.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
scripts/checkpatch.pl
... | ... | @@ -1793,7 +1793,7 @@ |
1793 | 1793 | $c = 'C' if ($elements[$n + 2] =~ /^$;/); |
1794 | 1794 | $c = 'B' if ($elements[$n + 2] =~ /^(\)|\]|;)/); |
1795 | 1795 | $c = 'O' if ($elements[$n + 2] eq ''); |
1796 | - $c = 'E' if ($elements[$n + 2] =~ /\s*\$/); | |
1796 | + $c = 'E' if ($elements[$n + 2] =~ /^\s*\$/); | |
1797 | 1797 | } else { |
1798 | 1798 | $c = 'E'; |
1799 | 1799 | } |