]> Pileus Git - ~andy/linux/blobdiff - scripts/checkpatch.pl
checkpatch: warn only on "space before semicolon" at end of line
[~andy/linux] / scripts / checkpatch.pl
index 59fa00e97878a5344e451369d1d7df241400b2ad..8efce590d4b6ea528edc63ddb10c02537c1a79c4 100755 (executable)
@@ -3121,7 +3121,7 @@ sub process {
                }
 
 # check for whitespace before a non-naked semicolon
-               if ($line =~ /^\+.*\S\s+;/) {
+               if ($line =~ /^\+.*\S\s+;\s*$/) {
                        if (WARN("SPACING",
                                 "space prohibited before semicolon\n" . $herecurr) &&
                            $fix) {