diff --git a/[refs] b/[refs] index 64d877c13777..ffe9d0c7fc37 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5368df20fb364e394da3ab88d3d60ee3c0a9e5ba +refs/heads/master: 6f779c18ca74358b6ac8eb8f5d502843fa92be4e diff --git a/trunk/scripts/checkpatch.pl b/trunk/scripts/checkpatch.pl index a2e4a3d9c6d7..2e513fdf3043 100755 --- a/trunk/scripts/checkpatch.pl +++ b/trunk/scripts/checkpatch.pl @@ -1417,7 +1417,8 @@ sub process { $s =~ s/\n./\n/gs; # Find out how long the conditional actually is. - my $cond_lines = 0 + $c =~ /\n/gs; + my @newlines = ($c =~ /\n/gs); + my $cond_lines = 1 + $#newlines; # We want to check the first line inside the block # starting at the end of the conditional, so remove: