All of lore.kernel.org
 help / color / mirror / Atom feed
* [nft PATCH] expression: Fix inconsistent output in set
@ 2014-04-11  8:26 Ana Rey
  2014-04-12  9:49 ` Patrick McHardy
  0 siblings, 1 reply; 2+ messages in thread
From: Ana Rey @ 2014-04-11  8:26 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Ana Rey

Add a whitespace between the last element in a set and the close braces.

Old output set:

	set set-test {
		type ipv4_address
		elements = { 192.168.1.44, 192.168.2.4}
	}

New output set:
	set set-test {
		type ipv4_address
		elements = { 192.168.1.44, 192.168.2.4 }
	}

Signed-off-by: Ana Rey <anarey@gmail.com>
---
 src/expression.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/expression.c b/src/expression.c
index fa14d99..3b299ff 100644
--- a/src/expression.c
+++ b/src/expression.c
@@ -734,7 +734,7 @@ static void set_expr_print(const struct expr *expr)
 {
 	printf("{ ");
 	compound_expr_print(expr, ", ");
-	printf("}");
+	printf(" }");
 }
 
 static void set_expr_set_type(const struct expr *expr,
-- 
1.9.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [nft PATCH] expression: Fix inconsistent output in set
  2014-04-11  8:26 [nft PATCH] expression: Fix inconsistent output in set Ana Rey
@ 2014-04-12  9:49 ` Patrick McHardy
  0 siblings, 0 replies; 2+ messages in thread
From: Patrick McHardy @ 2014-04-12  9:49 UTC (permalink / raw)
  To: Ana Rey; +Cc: netfilter-devel

On Fri, Apr 11, 2014 at 10:26:46AM +0200, Ana Rey wrote:
> Add a whitespace between the last element in a set and the close braces.
> 
> Old output set:
> 
> 	set set-test {
> 		type ipv4_address
> 		elements = { 192.168.1.44, 192.168.2.4}
> 	}
> 
> New output set:
> 	set set-test {
> 		type ipv4_address
> 		elements = { 192.168.1.44, 192.168.2.4 }
> 	}
> 

That's actually deliberate. A space is always added before a set member, but never
after.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-04-12  9:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-11  8:26 [nft PATCH] expression: Fix inconsistent output in set Ana Rey
2014-04-12  9:49 ` Patrick McHardy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.