summaryrefslogtreecommitdiffstats
path: root/src/rule.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2016-03-04 10:23:21 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2016-03-04 11:13:46 +0100
commit2b7b0f271293e996f1601c003e724923728df80f (patch)
tree451d58da000c50324304724a810e26a6e6ec8ca3 /src/rule.c
parenta31c57f120e447511a2034e2a11a4b2dfee70728 (diff)
rule: simplify ("rule: delete extra space in sets printing")
This simplifies bd23f7628570 ("rule: delete extra space in sets printing") by passing the whitespace from set_print_plain() called from the monitoring path. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Acked-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Diffstat (limited to 'src/rule.c')
-rw-r--r--src/rule.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/rule.c b/src/rule.c
index 2f03b985..0b785495 100644
--- a/src/rule.c
+++ b/src/rule.c
@@ -269,9 +269,6 @@ static void set_print_declaration(const struct set *set,
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)
printf(" : %s", set->datatype->name);
@@ -352,7 +349,7 @@ void set_print_plain(const struct set *s)
{
struct print_fmt_options opts = {
.tab = "",
- .nl = "",
+ .nl = " ",
.table = s->handle.table,
.family = family2str(s->handle.family),
.stmt_separator = ";",