diff options
-rw-r--r-- | shell/hush.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/shell/hush.c b/shell/hush.c index f2ffcf54d..8f1017e3c 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -5019,18 +5019,13 @@ static struct pipe *parse_stream(char **pstring, | |||
5019 | * i.e., at the previous line. | 5019 | * i.e., at the previous line. |
5020 | * We need to skip all whitespace before newlines. | 5020 | * We need to skip all whitespace before newlines. |
5021 | */ | 5021 | */ |
5022 | if (ch != '\n') { | 5022 | while (ch != '\n') { |
5023 | /* It was whitespace, but not a newline. | 5023 | next = i_peek(input); |
5024 | * Eat all whitespace. | 5024 | if (next != ' ' && next != '\t' && next != '\n') |
5025 | */ | 5025 | break; /* next char is not ws */ |
5026 | for (;;) { | 5026 | ch = i_getch(input); |
5027 | next = i_peek(input); | ||
5028 | if (next != ' ' && next != '\t' && next != '\n') | ||
5029 | break; /* next char is not ws */ | ||
5030 | ch = i_getch(input); | ||
5031 | } | ||
5032 | /* ch == last eaten whitespace char */ | ||
5033 | } | 5027 | } |
5028 | /* ch == last eaten whitespace char */ | ||
5034 | #endif | 5029 | #endif |
5035 | if (done_word(&dest, &ctx)) { | 5030 | if (done_word(&dest, &ctx)) { |
5036 | goto parse_error; | 5031 | goto parse_error; |