summaryrefslogtreecommitdiffstats
path: root/src/expr/byteorder.c
diff options
context:
space:
mode:
authorÁlvaro Neira Ayuso <alvaroneay@gmail.com>2013-10-13 21:52:34 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2013-10-17 10:03:37 +0200
commitec4b60bebcab23d46aa09bed06018457c35e5afa (patch)
tree20a277a82715a2771869320cb1854daa55e52644 /src/expr/byteorder.c
parent271442070bdde632e591871ade7b39ffd2cf63fb (diff)
src: json: remove spaces
Remove all the spaces from the JSON output to reduce the size of the output string, this also provides a consistent output in table, chain, rule and set. As Stephen Hemminger suggested, better to squash the output to consume as less bytes as possible. Signed-off-by: Alvaro Neira Ayuso <alvaroneay@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/expr/byteorder.c')
-rw-r--r--src/expr/byteorder.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/expr/byteorder.c b/src/expr/byteorder.c
index f05ddb5..7012452 100644
--- a/src/expr/byteorder.c
+++ b/src/expr/byteorder.c
@@ -298,11 +298,11 @@ nft_rule_expr_byteorder_snprintf_json(char *buf, size_t size,
{
int len = size, offset = 0, ret;
- ret = snprintf(buf, len, "\"sreg\" : %u, "
- "\"dreg\" : %u, "
- "\"op\" : \"%s\", "
- "\"len\" : %u, "
- "\"size\" : %u",
+ ret = snprintf(buf, len, "\"sreg\":%u,"
+ "\"dreg\":%u,"
+ "\"op\":\"%s\","
+ "\"len\":%u,"
+ "\"size\":%u",
byteorder->sreg, byteorder->dreg,
expr_byteorder_str[byteorder->op],
byteorder->len, byteorder->size);