conf-parser: remove unused condition

Follow-up for 9ac2f3c4d2

config_parse() returns 0 only on ENOENT, which can
never happen since we pass the FILE stream.
This commit is contained in:
Mike Yuan
2023-11-13 10:32:38 +00:00
committed by Luca Boccassi
parent 6f510ec8d6
commit 8ea288db01
+6 -9
View File
@@ -564,14 +564,12 @@ static int config_parse_many_files(
r = config_parse(NULL, *fn, f, sections, lookup, table, flags, userdata, &st);
if (r < 0)
return r;
if (r > 0) {
if (ret_stats_by_path) {
r = hashmap_put_stats_by_path(&stats_by_path, *fn, &st);
if (r < 0)
return r;
}
assert(r > 0);
break;
if (ret_stats_by_path) {
r = hashmap_put_stats_by_path(&stats_by_path, *fn, &st);
if (r < 0)
return r;
}
}
@@ -583,8 +581,7 @@ static int config_parse_many_files(
r = config_parse(NULL, path_dropin, f_dropin, sections, lookup, table, flags, userdata, &st);
if (r < 0)
return r;
if (r == 0)
continue;
assert(r > 0);
if (ret_stats_by_path) {
r = hashmap_put_stats_by_path(&stats_by_path, path_dropin, &st);