]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - scripts/checkpatch.pl
checkpatch: handle missing #if open in context
[linux-2.6-omap-h63xx.git] / scripts / checkpatch.pl
index 7bed4ed2c5197c5d360533665dcea69bc6446109..eefef65fa584627c535ffc593bd9bb9d684193f1 100755 (executable)
@@ -411,13 +411,15 @@ sub ctx_statement_block {
 
        my $type = '';
        my $level = 0;
-       my @stack = ([$type, $level]);
+       my @stack = ();
        my $p;
        my $c;
        my $len = 0;
 
        my $remainder;
        while (1) {
+               @stack = (['', 0]) if ($#stack == -1);
+
                #warn "CSB: blk<$blk> remain<$remain>\n";
                # If we are about to drop off the end, pull in more
                # context.