Skip to contentSkip to conversation

rule: simplify ("rule: delete extra space in sets printing")

PATCH In review Pablo Neira Ayuso 2 participants 2 messages Mar 4, 2016 netfilter

lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 1/1 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.

---
 src/rule.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
src/rule.c +1 -4
index 2f03b98..0b78549 100644
@@ -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	= ";",
Signature · 1 line
2.1.4
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Pablo Neira Ayuso

This simplifies bd23f7628570 ("rule: delete extra space in sets printing") by passing the whitespace from set_print_plain() called from the monitoring path.

Signature · 5 lines
Arturo Borrero González
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html