summaryrefslogtreecommitdiffstats
path: root/src/conf.c
diff options
context:
space:
mode:
authorNicolas Pitre <nico@fluxnic.net>2021-03-21 23:13:05 -0400
committerNicolas Pitre <nico@fluxnic.net>2021-03-22 01:24:17 -0400
commitd76c7668fb509e2817e0ff95913eb28e2519f741 (patch)
treee9b702a78a0b48984cccccbf0cbcc2f6569d85b6 /src/conf.c
parent97ef9034c09326f850f726785d91ea67ca4cfa86 (diff)
fix dictionary string parser
I didn't notice that multiple key=value pairs were possible in a single string. Here's a new implementation that does it, with the ability to parse the whole default_config string as well as command line args.
Diffstat (limited to 'src/conf.c')
-rw-r--r--src/conf.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/conf.c b/src/conf.c
index 8d08d99..1d01fbe 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -107,12 +107,7 @@ const char default_config[] =
// argument rather than using user_conf_d directly.
void store_default_config_values() {
- const char *line = default_config;
-
- do {
- parse_str(user_conf_d, line, 0);
- line = strchr(line, '\n');
- } while(line && *++line != 0);
+ parse_str(user_conf_d, default_config, 0);
// Calculate GMT offset (not on Solaris, doesn't have tm_gmtoff)
#if defined(USELOCALE) && !defined(__sun)