hush: fix build breakage (variable declared in for())
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
		| @@ -7013,7 +7013,9 @@ static int run_list(struct pipe *pi) | |||||||
|  |  | ||||||
| #if ENABLE_HUSH_LOOPS | #if ENABLE_HUSH_LOOPS | ||||||
| 	/* Check syntax for "for" */ | 	/* 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) | 			if (cpipe->res_word != RES_FOR && cpipe->res_word != RES_IN) | ||||||
| 				continue; | 				continue; | ||||||
| 			/* current word is FOR or IN (BOLD in comments below) */ | 			/* current word is FOR or IN (BOLD in comments below) */ | ||||||
| @@ -7036,6 +7038,7 @@ static int run_list(struct pipe *pi) | |||||||
| 				return 1; | 				return 1; | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
|  | 	} | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
| 	/* Past this point, all code paths should jump to ret: label | 	/* Past this point, all code paths should jump to ret: label | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user