Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 114782
b: refs/heads/master
c: bb44ad3
h: refs/heads/master
v: v3
  • Loading branch information
Andy Whitcroft authored and Linus Torvalds committed Oct 16, 2008
1 parent abc169a commit 932329b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 480120586464e5a8cd2289a90ffbb5c042e66ba0
refs/heads/master: bb44ad39c886401e1ffe0876565f8b3fcea64e9d
11 changes: 10 additions & 1 deletion trunk/scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -2001,7 +2001,16 @@ sub process {
if (length($c) && $s !~ /^\s*{?\s*\\*\s*$/ &&
$c !~ /}\s*while\s*/)
{
ERROR("trailing statements should be on next line\n" . $herecurr);
# Find out how long the conditional actually is.
my @newlines = ($c =~ /\n/gs);
my $cond_lines = 1 + $#newlines;

my $stat_real = raw_line($linenr, $cond_lines);
if (defined($stat_real) && $cond_lines > 1) {
$stat_real = "[...]\n$stat_real";
}

ERROR("trailing statements should be on next line\n" . $herecurr . $stat_real);
}
}

Expand Down

0 comments on commit 932329b

Please sign in to comment.