diff mbox

[libnftables,4/7] chain: remove the properties node in Json output

Message ID 20130731132112.29730.21871.stgit@Ph0enix
State Accepted
Headers show

Commit Message

Alvaro Neira July 31, 2013, 1:21 p.m. UTC
From: Álvaro Neira Ayuso <alvaroneay@gmail.com>

I have removed the properties node from chain because it's a node without relevant information

Signed-off-by: Alvaro Neira Ayuso <alvaroneay@gmail.com>
---
 src/chain.c |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)


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

Patch

diff --git a/src/chain.c b/src/chain.c
index 621794c..7e2567b 100644
--- a/src/chain.c
+++ b/src/chain.c
@@ -669,10 +669,9 @@  static int nft_chain_snprintf_json(char *buf, size_t size, struct nft_chain *c)
 			"\"handle\": %"PRIu64","
 			"\"bytes\": %"PRIu64","
 			"\"packets\": %"PRIu64","
-			"\"properties\": {"
-				"\"family\": \"%s\","
-				"\"table\": \"%s\","
-				"\"use\": %d",
+			"\"family\": \"%s\","
+			"\"table\": \"%s\","
+			"\"use\": %d",
 			c->name, c->handle, c->bytes, c->packets,
 			nft_family2str(c->family),
 			c->table, c->use);
@@ -690,7 +689,6 @@  static int nft_chain_snprintf_json(char *buf, size_t size, struct nft_chain *c)
 	}
 
 	ret = snprintf(buf+offset, size,
-			"}"
 		"}"
 		"}");
 	SNPRINTF_BUFFER_SIZE(ret, size, len, offset);