Diff options
Diffstat (limited to '')
| -rw-r--r-- | source/config.c | 7 |
1 file changed, 3 insertions, 4 deletions
diff --git a/source/config.c b/source/config.c index b029613..49cd398 100644 --- a/source/config.c +++ b/source/config.c @@ -85,7 +85,7 @@ static int read_entry(FILE *f, struct strbuf *name, struct strbuf *value) } } -int config_file_parse(const char *filename, config_file_value_fn fn) +void config_file_parse(const char *filename, config_file_value_fn fn) { static int nesting; struct strbuf name = STRBUF_INIT; @@ -95,9 +95,9 @@ int config_file_parse(const char *filename, config_file_value_fn fn) // An include line calls back into here, so an include cycle would // recurse until the stack gave out. if (nesting > MAX_INCLUDE_NESTING) - return -1; + return; if (!(f = fopen(filename, "r"))) - return -1; + return; nesting++; while (read_entry(f, &name, &value)) fn(name.buf, value.buf); @@ -105,5 +105,4 @@ int config_file_parse(const char *filename, config_file_value_fn fn) fclose(f); strbuf_release(&name); strbuf_release(&value); - return 0; } |
