From 45ca2d50f8fc30183fce596251933587e6305a02 Mon Sep 17 00:00:00 2001 From: Andy Whitcroft Date: Wed, 15 Oct 2008 22:02:27 -0700 Subject: [PATCH] --- yaml --- r: 114770 b: refs/heads/master c: 6f779c18ca74358b6ac8eb8f5d502843fa92be4e h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/scripts/checkpatch.pl | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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: