From: Denys Vlasenko Date: Mon, 17 Jul 2017 19:19:53 +0000 (+0200) Subject: hush: smaller code in !READONLY configs X-Git-Tag: 1_28_0~373 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b95ee96e7528554fc3ee2c48fbd59d75c59148db;p=oweals%2Fbusybox.git hush: smaller code in !READONLY configs Signed-off-by: Denys Vlasenko --- diff --git a/shell/hush.c b/shell/hush.c index a68986329..2125e757d 100644 --- a/shell/hush.c +++ b/shell/hush.c @@ -9347,11 +9347,14 @@ static int helper_export_local(char **argv, } } # if ENABLE_HUSH_LOCAL - if (exp == 0 && ro == 0 /* local? */ - && var && var->func_nest_level == lvl + /* Is this "local" bltin? */ + if (exp == 0 + IF_HUSH_READONLY(&& ro == 0) /* in !READONLY config, always true */ ) { - /* "local x=abc; ...; local x" - ignore second local decl */ - continue; + if (var && var->func_nest_level == lvl) { + /* "local x=abc; ...; local x" - ignore second local decl */ + continue; + } } # endif /* Exporting non-existing variable.