checkpatch: indent checks -- stop when we run out of continuation lines
Changes
1 files changed · +3 −2
| File | Status | Add | Del | Content |
|---|---|---|---|---|
| scripts/checkpatch.pl | modified | +3 | −2 | View file |
scripts/checkpatch.pl
View filediff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index aa009a3..b6f267b 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1547,8 +1547,9 @@ sub process {
$s =~ /^\s*#\s*?/ ||
$s =~ /^\s*$Ident\s*:/) {
$continuation = ($s =~ /^.*?\\\n/) ? 1 : 0;
- $s =~ s/^.*?\n//;
- $cond_lines++;
+ if ($s =~ s/^.*?\n//) {
+ $cond_lines++;
+ }
}
}