diff options
author | David Oberhollenzer <goliath@infraroot.at> | 2020-04-24 12:28:06 +0200 |
---|---|---|
committer | David Oberhollenzer <goliath@infraroot.at> | 2020-04-24 12:28:06 +0200 |
commit | 5307b95b93be495e40e4770fa6194db6ee27533a (patch) | |
tree | a06532a45a74fa8a72c8f5f6fa5c49b043403df7 /lib/libcfg | |
parent | 70ea16b0b4423f02e4f0c265320c336341363793 (diff) |
Cleanup: remove flag mechanism from config parser entirely
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
Diffstat (limited to 'lib/libcfg')
-rw-r--r-- | lib/libcfg/rdcfg.c | 9 |
1 files changed, 4 insertions, 5 deletions
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; } } |