[PATCH nft] rule: simplify ("rule: delete extra space in sets printing")

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>
---
 src/rule.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/rule.c b/src/rule.c
index 2f03b98..0b78549 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	= ";",
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux