From bd23f7628570ace0dc60c1d05f5abba37d5d7ceb Mon Sep 17 00:00:00 2001 From: Arturo Borrero Date: Wed, 13 Jan 2016 18:21:41 +0100 Subject: rule: delete extra space in sets printing The extra space is printed when sets are printed in tabulated format. table inet test { set test { ^ type ipv4_addr } } However, the space is still required in printing in plain format (ie, monitor). Signed-off-by: Arturo Borrero Gonzalez Signed-off-by: Pablo Neira Ayuso --- src/rule.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/rule.c b/src/rule.c index 18ff5920..2f03b985 100644 --- a/src/rule.c +++ b/src/rule.c @@ -267,7 +267,10 @@ static void set_print_declaration(const struct set *set, if (opts->table != NULL) printf(" %s", opts->table); - printf(" %s { %s", set->handle.set, opts->nl); + printf(" %s {%s", set->handle.set, opts->nl); + + if (!opts->nl[0]) + printf(" "); printf("%s%stype %s", opts->tab, opts->tab, set->keytype->name); if (set->flags & SET_F_MAP) -- cgit v1.2.3