summaryrefslogtreecommitdiff
path: root/lib/isccfg/parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/isccfg/parser.c')
-rw-r--r--lib/isccfg/parser.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/isccfg/parser.c b/lib/isccfg/parser.c
index 7c969961f4cab..c3eb5b105b3e5 100644
--- a/lib/isccfg/parser.c
+++ b/lib/isccfg/parser.c
@@ -262,10 +262,11 @@ cfg_print_tuple(cfg_printer_t *pctx, const cfg_obj_t *obj) {
for (f = fields, i = 0; f->name != NULL; f++, i++) {
const cfg_obj_t *fieldobj = obj->value.tuple[i];
- if (need_space)
- cfg_print_chars(pctx, " ", 1);
+ if (need_space && fieldobj->type->rep != &cfg_rep_void)
+ cfg_print_cstr(pctx, " ");
cfg_print_obj(pctx, fieldobj);
- need_space = ISC_TF(fieldobj->type->print != cfg_print_void);
+ need_space = ISC_TF(need_space ||
+ fieldobj->type->print != cfg_print_void);
}
}
@@ -277,7 +278,7 @@ cfg_doc_tuple(cfg_printer_t *pctx, const cfg_type_t *type) {
for (f = fields; f->name != NULL; f++) {
if (need_space)
- cfg_print_chars(pctx, " ", 1);
+ cfg_print_cstr(pctx, " ");
cfg_doc_obj(pctx, f->type);
need_space = ISC_TF(f->type->print != cfg_print_void);
}