Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 217595
b: refs/heads/master
c: 01464f3
h: refs/heads/master
i:
  217593: 4bda607
  217591: 9ea19db
v: v3
  • Loading branch information
Andy Whitcroft authored and Linus Torvalds committed Oct 26, 2010
1 parent 1d66f52 commit 72237cf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 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: 3cbf62df3a8ce61cb1aa20b7dae964058988bfdd
refs/heads/master: 01464f30a97c5c30bf9633309b27cce055cef8fd
12 changes: 6 additions & 6 deletions trunk/scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -691,15 +691,15 @@ sub ctx_block_get {
$blk .= $rawlines[$line];

# Handle nested #if/#else.
if ($rawlines[$line] =~ /^.\s*#\s*(?:ifndef|ifdef|if)\s/) {
if ($lines[$line] =~ /^.\s*#\s*(?:ifndef|ifdef|if)\s/) {
push(@stack, $level);
} elsif ($rawlines[$line] =~ /^.\s*#\s*(?:else|elif)\b/) {
} elsif ($lines[$line] =~ /^.\s*#\s*(?:else|elif)\b/) {
$level = $stack[$#stack - 1];
} elsif ($rawlines[$line] =~ /^.\s*#\s*endif\b/) {
} elsif ($lines[$line] =~ /^.\s*#\s*endif\b/) {
$level = pop(@stack);
}

foreach my $c (split(//, $rawlines[$line])) {
foreach my $c (split(//, $lines[$line])) {
##print "C<$c>L<$level><$open$close>O<$off>\n";
if ($off > 0) {
$off--;
Expand Down Expand Up @@ -1652,7 +1652,7 @@ sub process {

if ($ctx !~ /{\s*/ && defined($lines[$ctx_ln -1]) && $lines[$ctx_ln - 1] =~ /^\+\s*{/) {
ERROR("that open brace { should be on the previous line\n" .
"$here\n$ctx\n$lines[$ctx_ln - 1]\n");
"$here\n$ctx\n$rawlines[$ctx_ln - 1]\n");
}
if ($level == 0 && $pre_ctx !~ /}\s*while\s*\($/ &&
$ctx =~ /\)\s*\;\s*$/ &&
Expand All @@ -1661,7 +1661,7 @@ sub process {
my ($nlength, $nindent) = line_stats($lines[$ctx_ln - 1]);
if ($nindent > $indent) {
WARN("trailing semicolon indicates no statements, indent implies otherwise\n" .
"$here\n$ctx\n$lines[$ctx_ln - 1]\n");
"$here\n$ctx\n$rawlines[$ctx_ln - 1]\n");
}
}
}
Expand Down

0 comments on commit 72237cf

Please sign in to comment.