aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
-rw-r--r--tokenize.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/tokenize.c b/tokenize.c
index 211a36f4..e72c56ed 100644
--- a/tokenize.c
+++ b/tokenize.c
@@ -578,15 +578,14 @@ static int get_string_token(int next, stream_t *stream)
static int drop_stream_eoln(stream_t *stream)
{
- int next = nextchar(stream);
drop_token(stream);
for (;;) {
- int curr = next;
- if (curr == EOF)
- return next;
- next = nextchar(stream);
- if (curr == '\n')
- return next;
+ switch (nextchar(stream)) {
+ case EOF:
+ return EOF;
+ case '\n':
+ return nextchar(stream);
+ }
}
}