From c8b98054b6597903b36d097d248402f00acfcf9d Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 24 Sep 2013 16:56:59 +0200 Subject: rule: json: fix wrong indentation in nft_rule_snprintf_json Comestic cleanup. Signed-off-by: Pablo Neira Ayuso --- src/rule.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/rule.c') diff --git a/src/rule.c b/src/rule.c index e744cf8..b4ce8f1 100644 --- a/src/rule.c +++ b/src/rule.c @@ -706,10 +706,10 @@ static int nft_rule_snprintf_json(char *buf, size_t size, struct nft_rule *r, struct nft_rule_expr *expr; ret = snprintf(buf, size, - "{ \"rule\": { \"family\" : \"%s\", \"table\" : \"%s\", " - "\"chain\" : \"%s\", \"handle\" : %llu,", - nft_family2str(r->family), r->table, r->chain, - (unsigned long long)r->handle); + "{ \"rule\": { \"family\" : \"%s\", \"table\" : \"%s\", " + "\"chain\" : \"%s\", \"handle\" : %llu,", + nft_family2str(r->family), r->table, r->chain, + (unsigned long long)r->handle); SNPRINTF_BUFFER_SIZE(ret, size, len, offset); ret = snprintf(buf+offset, len, "\"flags\" : %u, ", r->rule_flags); @@ -731,11 +731,11 @@ static int nft_rule_snprintf_json(char *buf, size_t size, struct nft_rule *r, } ret = snprintf(buf+offset, len, "\"expr\" : ["); - SNPRINTF_BUFFER_SIZE(ret, size, len, offset); + SNPRINTF_BUFFER_SIZE(ret, size, len, offset); list_for_each_entry(expr, &r->expr_list, head) { ret = snprintf(buf+offset, len, - " { \"type\" : \"%s\", ", expr->ops->name); + " { \"type\" : \"%s\", ", expr->ops->name); SNPRINTF_BUFFER_SIZE(ret, size, len, offset); ret = expr->ops->snprintf(buf+offset, len, type, flags, expr); @@ -746,7 +746,7 @@ static int nft_rule_snprintf_json(char *buf, size_t size, struct nft_rule *r, } ret = snprintf(buf+offset-1, len, "]}}"); - SNPRINTF_BUFFER_SIZE(ret, size, len, offset); + SNPRINTF_BUFFER_SIZE(ret, size, len, offset); return offset; } -- cgit v1.2.3