hush: smaller code in !READONLY configs
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
1e660422b1
commit
b95ee96e75
11
shell/hush.c
11
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.
|
||||
|
Loading…
Reference in New Issue
Block a user