aboutsummaryrefslogtreecommitdiff
path: root/shell/hush.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/hush.c')
-rw-r--r--shell/hush.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/shell/hush.c b/shell/hush.c
index 7b59b0ff9..971a16aff 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -2134,12 +2134,16 @@ static void handle_changed_special_names(const char *name, unsigned name_len)
&& name_len == 6
) {
#if ENABLE_HUSH_LINENO_VAR
- if (strncmp(name, "LINENO", 6) == 0)
+ if (strncmp(name, "LINENO", 6) == 0) {
G.lineno_var = NULL;
+ return;
+ }
#endif
#if ENABLE_HUSH_GETOPTS
- if (strncmp(name, "OPTIND", 6) == 0)
+ if (strncmp(name, "OPTIND", 6) == 0) {
G.getopt_count = 0;
+ return;
+ }
#endif
}
}