diff options
Diffstat (limited to 'shell/hush.c')
-rw-r--r-- | shell/hush.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/shell/hush.c b/shell/hush.c index db608018c..47cdf6f02 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -2986,7 +2986,9 @@ static int done_word(o_string *word, struct p_context *ctx) | |||
2986 | } | 2986 | } |
2987 | #if HAS_KEYWORDS | 2987 | #if HAS_KEYWORDS |
2988 | #if ENABLE_HUSH_CASE | 2988 | #if ENABLE_HUSH_CASE |
2989 | if (ctx->ctx_dsemicolon) { | 2989 | if (ctx->ctx_dsemicolon |
2990 | && strcmp(word->data, "esac") != 0 /* not "... pattern) cmd;; esac" */ | ||
2991 | ) { | ||
2990 | /* already done when ctx_dsemicolon was set to 1: */ | 2992 | /* already done when ctx_dsemicolon was set to 1: */ |
2991 | /* ctx->ctx_res_w = RES_MATCH; */ | 2993 | /* ctx->ctx_res_w = RES_MATCH; */ |
2992 | ctx->ctx_dsemicolon = 0; | 2994 | ctx->ctx_dsemicolon = 0; |
@@ -3112,7 +3114,7 @@ static void done_pipe(struct p_context *ctx, pipe_style type) | |||
3112 | if (not_null IF_HAS_KEYWORDS(|| ctx->ctx_res_w != RES_NONE)) { | 3114 | if (not_null IF_HAS_KEYWORDS(|| ctx->ctx_res_w != RES_NONE)) { |
3113 | struct pipe *new_p; | 3115 | struct pipe *new_p; |
3114 | debug_printf_parse("done_pipe: adding new pipe: " | 3116 | debug_printf_parse("done_pipe: adding new pipe: " |
3115 | " not_null:%d ctx->ctx_res_w:%d\n", | 3117 | "not_null:%d ctx->ctx_res_w:%d\n", |
3116 | not_null, ctx->ctx_res_w); | 3118 | not_null, ctx->ctx_res_w); |
3117 | new_p = new_pipe(); | 3119 | new_p = new_pipe(); |
3118 | ctx->pipe->next = new_p; | 3120 | ctx->pipe->next = new_p; |