summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko2008-07-09 20:14:53 +0000
committerDenis Vlasenko2008-07-09 20:14:53 +0000
commit6bdff08e6c048106de55998908af7c2f139b10a0 (patch)
tree3e5ae682abd6ea10f59d7bfc08d09bb0d7b59843
parent7c053262af3765735b65d0ec650e3adda8f6696e (diff)
downloadbusybox-6bdff08e6c048106de55998908af7c2f139b10a0.zip
busybox-6bdff08e6c048106de55998908af7c2f139b10a0.tar.gz
hush: compile fixes for !LOOPS case
-rw-r--r--shell/hush.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/shell/hush.c b/shell/hush.c
index c71ddb1..aab53c3 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -2931,8 +2931,10 @@ static int done_word(o_string *word, struct p_context *ctx)
}
#if HAS_KEYWORDS
if (!child->argv /* if it's the first word... */
+#if ENABLE_HUSH_LOOPS
&& ctx->ctx_res_w != RES_FOR /* ...not after FOR or IN */
&& ctx->ctx_res_w != RES_IN
+#endif
) {
debug_printf_parse(": checking '%s' for reserved-ness\n", word->data);
if (reserved_word(word, ctx)) {
@@ -3049,9 +3051,11 @@ static void done_pipe(struct p_context *ctx, pipe_style type)
* RES_FOR and RES_IN are NOT sticky (needed to support
* cases where variable or value happens to match a keyword):
*/
+#if ENABLE_HUSH_LOOPS
if (ctx->ctx_res_w == RES_FOR
|| ctx->ctx_res_w == RES_IN)
ctx->ctx_res_w = RES_NONE;
+#endif
/* Create the memory for child, roughly:
* ctx->pipe->progs = new struct child_prog;
* ctx->pipe->progs[0].family = ctx->pipe;