@@ -125,9 +125,9 @@ sub dump_config($) {
}
}
-sub parse_expr {
- my $pos = shift;
- my $mod_plus = shift;
+sub parse_expr($$);
+sub parse_expr($$) {
+ my ($pos, $mod_plus) = @_;
my $arg = $arg[$$pos++];
my %ops = (
@@ -142,7 +142,7 @@ sub parse_expr {
die "Parse error" if (!$arg);
if (exists($ops{$arg})) {
- my $arg1 = parse_expr($pos);
+ my $arg1 = parse_expr($pos, 0);
my $arg2 = parse_expr($pos, ($arg eq 'm+') ? 1 : 0);
return &{$ops{$arg}->[0]}($arg1, $arg2, $ops{$arg}->[1]);
} else {
@@ -163,5 +163,5 @@ while (@ARGV > 0 and $ARGV[0] =~ /^-\w+$/) {
@arg = @ARGV;
my $pos = 0;
-dump_config(parse_expr(\$pos));
+dump_config(parse_expr(\$pos, 0));
die "Parse error" if ($arg[$pos]);
The inconsistent calling had already been noticed. Now the trap has been spotted, so clean this up. Signed-off-by: Elliott Mitchell <ehem+openwrt@m5p.com> --- scripts/kconfig.pl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)