Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6f779c18 authored by Andy Whitcroft's avatar Andy Whitcroft Committed by Linus Torvalds
Browse files

checkpatch: suspect indent count condition lines correctly



Correct calculation of the number of lines of condition where we have
suspect indent.

Signed-off-by: default avatarAndy Whitcroft <apw@shadowen.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 5368df20
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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: