summaryrefslogtreecommitdiffabout
path: root/config.c
Side-by-side diff
Diffstat (limited to 'config.c') (more/less context) (ignore whitespace changes)
-rw-r--r--config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/config.c b/config.c
index 858ab69..ee49b62 100644
--- a/config.c
+++ b/config.c
@@ -29,13 +29,13 @@ int read_config_line(FILE *f, char *line, const char **value, int bufsize)
while(i<bufsize-1) {
int c = next_char(f);
if (!isname && (c=='#' || c==';')) {
skip_line(f);
continue;
}
- if (!isname && isblank(c))
+ if (!isname && isspace(c))
continue;
if (c=='=' && !*value) {
line[i] = 0;
*value = &line[i+1];
} else if (c=='\n' && !isname) {
@@ -61,13 +61,13 @@ int cgit_read_config(const char *filename, configfn fn)
const char *value;
FILE *f = fopen(filename, "r");
if (!f)
return -1;
- while(len = read_config_line(f, line, &value, sizeof(line)))
+ while((len = read_config_line(f, line, &value, sizeof(line))) > 0)
(*fn)(line, value);
fclose(f);
return ret;
}