hush: if we did match "LINENO" or "OPTIND", stop further comparisons
function old new delta handle_changed_special_names 99 101 +2 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
cf079ffe1c
commit
00bd76728d
@ -2134,12 +2134,16 @@ static void handle_changed_special_names(const char *name, unsigned name_len)
|
|||||||
&& name_len == 6
|
&& name_len == 6
|
||||||
) {
|
) {
|
||||||
#if ENABLE_HUSH_LINENO_VAR
|
#if ENABLE_HUSH_LINENO_VAR
|
||||||
if (strncmp(name, "LINENO", 6) == 0)
|
if (strncmp(name, "LINENO", 6) == 0) {
|
||||||
G.lineno_var = NULL;
|
G.lineno_var = NULL;
|
||||||
|
return;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
#if ENABLE_HUSH_GETOPTS
|
#if ENABLE_HUSH_GETOPTS
|
||||||
if (strncmp(name, "OPTIND", 6) == 0)
|
if (strncmp(name, "OPTIND", 6) == 0) {
|
||||||
G.getopt_count = 0;
|
G.getopt_count = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user