From 8344ade81945337bfb37d0cffc97b68b441766d5 Mon Sep 17 00:00:00 2001 From: Andy Whitcroft Date: Thu, 15 Jan 2009 13:51:04 -0800 Subject: [PATCH] --- yaml --- r: 129677 b: refs/heads/master c: a27506459c5e6ccc8437fca0adb6d3759c883c28 h: refs/heads/master i: 129675: 833e4bbd524aa17c5308fd7e8bcfd7e13d9fe817 v: v3 --- [refs] | 2 +- trunk/scripts/checkpatch.pl | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 761896070452..e67c8121e134 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c91192d66d6cea7878b8542c9d9f1873971aba92 +refs/heads/master: a27506459c5e6ccc8437fca0adb6d3759c883c28 diff --git a/trunk/scripts/checkpatch.pl b/trunk/scripts/checkpatch.pl index 7bed4ed2c519..eefef65fa584 100755 --- a/trunk/scripts/checkpatch.pl +++ b/trunk/scripts/checkpatch.pl @@ -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.