summaryrefslogtreecommitdiff
path: root/lib/isccfg/parser.c
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2016-09-28 03:45:43 +0000
committerXin LI <delphij@FreeBSD.org>2016-09-28 03:45:43 +0000
commitc2a8859aa5c96190c179c911d3841c4de17b9c34 (patch)
treed692d2581f8989d075abe40c9f3f55f2fa650949 /lib/isccfg/parser.c
parent5ef882476736cbe802bb4e6437c520162c4f44ce (diff)
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);
}