hush: fix build breakage (variable declared in for())

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2010-12-18 01:34:49 +01:00
parent a6041860f8
commit 0d6a4ecb30

View File

@ -7013,7 +7013,9 @@ static int run_list(struct pipe *pi)
#if ENABLE_HUSH_LOOPS
/* Check syntax for "for" */
for (struct pipe *cpipe = pi; cpipe; cpipe = cpipe->next) {
{
struct pipe *cpipe;
for (cpipe = pi; cpipe; cpipe = cpipe->next) {
if (cpipe->res_word != RES_FOR && cpipe->res_word != RES_IN)
continue;
/* current word is FOR or IN (BOLD in comments below) */
@ -7036,6 +7038,7 @@ static int run_list(struct pipe *pi)
return 1;
}
}
}
#endif
/* Past this point, all code paths should jump to ret: label