diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-09-24 16:56:59 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-09-24 17:19:36 +0200 |
commit | c8b98054b6597903b36d097d248402f00acfcf9d (patch) | |
tree | 436ecb57d8614321dc7b568fb6ea66f4adbf9fa6 /src/rule.c | |
parent | 600de5907e9f74fb6d7b7df51e062124c960949c (diff) |
rule: json: fix wrong indentation in nft_rule_snprintf_json
Comestic cleanup.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/rule.c')
-rw-r--r-- | src/rule.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -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; } |