diff options
Diffstat (limited to 'src/lib/confmgt')
-rw-r--r-- | src/lib/confmgt/confmgt.c | 9 | ||||
-rw-r--r-- | src/lib/confmgt/lib_confmgt.dox | 4 |
2 files changed, 10 insertions, 3 deletions
diff --git a/src/lib/confmgt/confmgt.c b/src/lib/confmgt/confmgt.c index 137bb2137c..9377736110 100644 --- a/src/lib/confmgt/confmgt.c +++ b/src/lib/confmgt/confmgt.c @@ -1348,9 +1348,10 @@ config_dump(const config_mgr_t *mgr, const void *default_options, */ continue; } - smartlist_add_asprintf(elements, "%s%s %s\n", + int value_exists = line->value && *(line->value); + smartlist_add_asprintf(elements, "%s%s%s%s\n", comment_option ? "# " : "", - line->key, line->value); + line->key, value_exists ? " " : "", line->value); } config_free_lines(assigned); } SMARTLIST_FOREACH_END(mv); @@ -1358,7 +1359,9 @@ config_dump(const config_mgr_t *mgr, const void *default_options, if (fmt->extra) { line = *(config_line_t**)STRUCT_VAR_P(options, fmt->extra->offset); for (; line; line = line->next) { - smartlist_add_asprintf(elements, "%s %s\n", line->key, line->value); + int value_exists = line->value && *(line->value); + smartlist_add_asprintf(elements, "%s%s%s\n", + line->key, value_exists ? " " : "", line->value); } } diff --git a/src/lib/confmgt/lib_confmgt.dox b/src/lib/confmgt/lib_confmgt.dox new file mode 100644 index 0000000000..964fe1d074 --- /dev/null +++ b/src/lib/confmgt/lib_confmgt.dox @@ -0,0 +1,4 @@ +/** +@dir lib/confmgt +@brief lib/confmgt +**/ |