Diffstat (limited to 'configfile.c')
| -rw-r--r-- | configfile.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/configfile.c b/configfile.c index 833f158..e039109 100644 --- a/configfile.c +++ b/configfile.c @@ -6,8 +6,7 @@ * (see COPYING for full license text) */ -#include <ctype.h> -#include <stdio.h> +#include <git-compat-util.h> #include "configfile.h" static int next_char(FILE *f) @@ -40,7 +39,9 @@ static int read_config_line(FILE *f, struct strbuf *name, struct strbuf *value) /* Skip comments and preceding spaces. */ for(;;) { - if (c == '#' || c == ';') + if (c == EOF) + return 0; + else if (c == '#' || c == ';') skip_line(f); else if (!isspace(c)) break; |