diff options
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-x | scripts/checkpatch.pl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index a2e4a3d9c6d7..2e513fdf3043 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
@@ -1417,7 +1417,8 @@ sub process { | |||
1417 | $s =~ s/\n./\n/gs; | 1417 | $s =~ s/\n./\n/gs; |
1418 | 1418 | ||
1419 | # Find out how long the conditional actually is. | 1419 | # Find out how long the conditional actually is. |
1420 | my $cond_lines = 0 + $c =~ /\n/gs; | 1420 | my @newlines = ($c =~ /\n/gs); |
1421 | my $cond_lines = 1 + $#newlines; | ||
1421 | 1422 | ||
1422 | # We want to check the first line inside the block | 1423 | # We want to check the first line inside the block |
1423 | # starting at the end of the conditional, so remove: | 1424 | # starting at the end of the conditional, so remove: |