ash: fix "unset OPTIND" throwing an error message
Added test was failing quite severely. Now only one subtest fails (OPTERR=0 has no effect). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@ -2099,7 +2099,9 @@ extern struct globals_var *const ash_ptr_to_globals_var;
|
||||
static void FAST_FUNC
|
||||
getoptsreset(const char *value)
|
||||
{
|
||||
shellparam.optind = number(value) ?: 1;
|
||||
shellparam.optind = 1;
|
||||
if (is_number(value))
|
||||
shellparam.optind = number(value) ?: 1;
|
||||
shellparam.optoff = -1;
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user