diff options
Diffstat (limited to 'shell/hush.c')
-rw-r--r-- | shell/hush.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/shell/hush.c b/shell/hush.c index c71ddb14f..aab53c336 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -2931,8 +2931,10 @@ static int done_word(o_string *word, struct p_context *ctx) | |||
2931 | } | 2931 | } |
2932 | #if HAS_KEYWORDS | 2932 | #if HAS_KEYWORDS |
2933 | if (!child->argv /* if it's the first word... */ | 2933 | if (!child->argv /* if it's the first word... */ |
2934 | #if ENABLE_HUSH_LOOPS | ||
2934 | && ctx->ctx_res_w != RES_FOR /* ...not after FOR or IN */ | 2935 | && ctx->ctx_res_w != RES_FOR /* ...not after FOR or IN */ |
2935 | && ctx->ctx_res_w != RES_IN | 2936 | && ctx->ctx_res_w != RES_IN |
2937 | #endif | ||
2936 | ) { | 2938 | ) { |
2937 | debug_printf_parse(": checking '%s' for reserved-ness\n", word->data); | 2939 | debug_printf_parse(": checking '%s' for reserved-ness\n", word->data); |
2938 | if (reserved_word(word, ctx)) { | 2940 | if (reserved_word(word, ctx)) { |
@@ -3049,9 +3051,11 @@ static void done_pipe(struct p_context *ctx, pipe_style type) | |||
3049 | * RES_FOR and RES_IN are NOT sticky (needed to support | 3051 | * RES_FOR and RES_IN are NOT sticky (needed to support |
3050 | * cases where variable or value happens to match a keyword): | 3052 | * cases where variable or value happens to match a keyword): |
3051 | */ | 3053 | */ |
3054 | #if ENABLE_HUSH_LOOPS | ||
3052 | if (ctx->ctx_res_w == RES_FOR | 3055 | if (ctx->ctx_res_w == RES_FOR |
3053 | || ctx->ctx_res_w == RES_IN) | 3056 | || ctx->ctx_res_w == RES_IN) |
3054 | ctx->ctx_res_w = RES_NONE; | 3057 | ctx->ctx_res_w = RES_NONE; |
3058 | #endif | ||
3055 | /* Create the memory for child, roughly: | 3059 | /* Create the memory for child, roughly: |
3056 | * ctx->pipe->progs = new struct child_prog; | 3060 | * ctx->pipe->progs = new struct child_prog; |
3057 | * ctx->pipe->progs[0].family = ctx->pipe; | 3061 | * ctx->pipe->progs[0].family = ctx->pipe; |