Revision dfe7053a scripts/checkpatch.pl

b/scripts/checkpatch.pl
2547 2547
					$line !~ /\#\s*else/) {
2548 2548
			my $allowed = 0;
2549 2549

  
2550
			# Check the pre-context.
2551
			if (substr($line, 0, $-[0]) =~ /(\}\s*)$/) {
2552
                            print "APW: ALLOWED: pre<$pre> line<$line>\n"
2553
                                if $dbg_adv_apw;
2554
                            $allowed = 1;
2555
			}
2550
                        # Check the pre-context.
2551
                        if (substr($line, 0, $-[0]) =~ /(\}\s*)$/) {
2552
                            my $pre = $1;
2553

  
2554
                            if ($line !~ /else/) {
2555
                                print "APW: ALLOWED: pre<$pre> line<$line>\n"
2556
                                    if $dbg_adv_apw;
2557
                                $allowed = 1;
2558
                            }
2559
                        }
2556 2560

  
2557 2561
			my ($level, $endln, @chunks) =
2558 2562
				ctx_statement_full($linenr, $realcnt, $-[0]);

Also available in: Unified diff