summaryrefslogtreecommitdiffstats
path: root/src/rule.c
diff options
context:
space:
mode:
authorArturo Borrero <arturo.borrero.glez@gmail.com>2016-01-13 18:21:41 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2016-03-03 19:54:45 +0100
commitbd23f7628570ace0dc60c1d05f5abba37d5d7ceb (patch)
tree8691b43b4b11327427f8bc7fdbc535a921c23325 /src/rule.c
parentcf8e0db8aacbafac5acb1f42afd62d8215ca5863 (diff)
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 <arturo.borrero.glez@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/rule.c')
-rw-r--r--src/rule.c5
1 files changed, 4 insertions, 1 deletions
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)