From d76c7668fb509e2817e0ff95913eb28e2519f741 Mon Sep 17 00:00:00 2001 From: Nicolas Pitre Date: Sun, 21 Mar 2021 23:13:05 -0400 Subject: 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. --- src/conf.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/conf.c') 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) -- cgit v1.2.3