diff options
Diffstat (limited to 'src/expr/cmp.c')
-rw-r--r-- | src/expr/cmp.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/expr/cmp.c b/src/expr/cmp.c index 63250f3..2c334ab 100644 --- a/src/expr/cmp.c +++ b/src/expr/cmp.c @@ -258,7 +258,7 @@ nft_rule_expr_cmp_snprintf_json(char *buf, size_t size, struct nft_expr_cmp *cmp { int len = size, offset = 0, ret; - ret = snprintf(buf, len, "\"sreg\":%u,\"op\":\"%s\",\"cmpdata\":{", + ret = snprintf(buf, len, "\"sreg\":%u,\"op\":\"%s\",", cmp->sreg, expr_cmp_str[cmp->op]); SNPRINTF_BUFFER_SIZE(ret, size, len, offset); @@ -266,9 +266,6 @@ nft_rule_expr_cmp_snprintf_json(char *buf, size_t size, struct nft_expr_cmp *cmp NFT_OUTPUT_JSON, 0, DATA_VALUE); SNPRINTF_BUFFER_SIZE(ret, size, len, offset); - ret = snprintf(buf+offset, len, "}"); - SNPRINTF_BUFFER_SIZE(ret, size, len, offset); - return offset; } @@ -277,7 +274,7 @@ nft_rule_expr_cmp_snprintf_xml(char *buf, size_t size, struct nft_expr_cmp *cmp) { int len = size, offset = 0, ret; - ret = snprintf(buf, len, "<sreg>%u</sreg><op>%s</op><cmpdata>", + ret = snprintf(buf, len, "<sreg>%u</sreg><op>%s</op>", cmp->sreg, expr_cmp_str[cmp->op]); SNPRINTF_BUFFER_SIZE(ret, size, len, offset); @@ -285,9 +282,6 @@ nft_rule_expr_cmp_snprintf_xml(char *buf, size_t size, struct nft_expr_cmp *cmp) NFT_OUTPUT_XML, 0, DATA_VALUE); SNPRINTF_BUFFER_SIZE(ret, size, len, offset); - ret = snprintf(buf+offset, len, "</cmpdata>"); - SNPRINTF_BUFFER_SIZE(ret, size, len, offset); - return offset; } |