X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/50e70d32f056c20db760328774d27524648fb739..4dee601bb6042cf7db2472b9c34530850345f680:/configfile.c diff --git a/configfile.c b/configfile.c index 31fe5c8..e039109 100644 --- a/configfile.c +++ b/configfile.c @@ -1,13 +1,12 @@ /* configfile.c: parsing of config files * - * Copyright (C) 2008 Lars Hjemli + * Copyright (C) 2006-2014 cgit Development Team * * Licensed under GNU General Public License v2 * (see COPYING for full license text) */ -#include -#include +#include #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;