]> git.cameronkatri.com Git - cgit.git/blobdiff - configfile.c
snapshot: support tar signature for compressed tar
[cgit.git] / configfile.c
index 31fe5c88915a418fbec3dfb58d44fc67f6ac6b0d..e0391091e147891ca2639142a7b29180030db125 100644 (file)
@@ -1,13 +1,12 @@
 /* configfile.c: parsing of config files
  *
- * Copyright (C) 2008 Lars Hjemli
+ * Copyright (C) 2006-2014 cgit Development Team <cgit@lists.zx2c4.com>
  *
  * Licensed under GNU General Public License v2
  *   (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;