Simplifying function drop_stream_eoln().
Signed-off-by: Richard Knutsson <[EMAIL PROTECTED]>
---
Is there a reason to call nextchar() before drop_token()?
diff --git a/tokenize.c b/tokenize.c
index fbe4c5a..f4c3d18 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);
+ }
}
}
-
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html