diff options
Diffstat (limited to '')
-rw-r--r-- | scripts/kconfig/lexer.l | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/kconfig/lexer.l b/scripts/kconfig/lexer.l index cc386e443..2c2b3e6f2 100644 --- a/scripts/kconfig/lexer.l +++ b/scripts/kconfig/lexer.l @@ -302,8 +302,11 @@ static char *expand_token(const char *in, size_t n) new_string(); append_string(in, n); - /* get the whole line because we do not know the end of token. */ - while ((c = input()) != EOF) { + /* + * get the whole line because we do not know the end of token. + * input() returns 0 (not EOF!) when it reachs the end of file. + */ + while ((c = input()) != 0) { if (c == '\n') { unput(c); break; |