From c58f76a08d34337822c093b7bf2d2c30439a03f6 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 31 Oct 2026 13:32:49 -0700 Subject: Return nothing from two calls nobody checks --- source/config.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source/config.c') 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; } -- cgit