summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2013-09-24 16:56:59 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2013-09-24 17:19:36 +0200
commitc8b98054b6597903b36d097d248402f00acfcf9d (patch)
tree436ecb57d8614321dc7b568fb6ea66f4adbf9fa6
parent600de5907e9f74fb6d7b7df51e062124c960949c (diff)
rule: json: fix wrong indentation in nft_rule_snprintf_json
Comestic cleanup. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--src/rule.c14
1 files changed, 7 insertions, 7 deletions
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;
}