From 5307b95b93be495e40e4770fa6194db6ee27533a Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Fri, 24 Apr 2020 12:28:06 +0200 Subject: Cleanup: remove flag mechanism from config parser entirely Signed-off-by: David Oberhollenzer --- lib/libcfg/rdcfg.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'lib/libcfg') diff --git a/lib/libcfg/rdcfg.c b/lib/libcfg/rdcfg.c index d3fc947..8bcc804 100644 --- a/lib/libcfg/rdcfg.c +++ b/lib/libcfg/rdcfg.c @@ -47,8 +47,7 @@ static int splitkv(rdline_t *rd, char **k, char **v) return 0; } -int rdcfg(void *cfgobj, rdline_t *rd, const cfg_param_t *params, size_t count, - int flags) +int rdcfg(void *cfgobj, rdline_t *rd, const cfg_param_t *params, size_t count) { const cfg_param_t *p; char *key, *value; @@ -67,7 +66,7 @@ int rdcfg(void *cfgobj, rdline_t *rd, const cfg_param_t *params, size_t count, ; if (*value != '\0') { - ret = p->handle(cfgobj, value, rd, flags); + ret = p->handle(cfgobj, value, rd); if (ret) return -1; } @@ -75,7 +74,7 @@ int rdcfg(void *cfgobj, rdline_t *rd, const cfg_param_t *params, size_t count, while ((ret = rdline(rd)) == 0) { if (strcmp(rd->line, "}") == 0) break; - if (p->handle(cfgobj, rd->line, rd, flags)) + if (p->handle(cfgobj, rd->line, rd)) return -1; } @@ -83,7 +82,7 @@ int rdcfg(void *cfgobj, rdline_t *rd, const cfg_param_t *params, size_t count, return -1; if (ret > 0) goto fail_bra; - } else if (p->handle(cfgobj, value, rd, flags)) { + } else if (p->handle(cfgobj, value, rd)) { return -1; } } -- cgit v1.2.3