From 989b793a3bf689757b2b8f08a1c264743d75fa0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Neira=20Ayuso?= Date: Mon, 11 Nov 2013 21:09:35 +0100 Subject: src: unify parse and output types Unify parse and output types that are redundant to all existing nftables objects. Thus, all NFT_*_O_[XML|JSON|DEFAULT] are merged into NFT_OUTPUT_[JSON|XML] and NFT_PARSE_[JSON|XML]. Signed-off-by: Alvaro Neira Ayuso Signed-off-by: Pablo Neira Ayuso --- src/expr/limit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/expr/limit.c') diff --git a/src/expr/limit.c b/src/expr/limit.c index 4fcf798..4854a77 100644 --- a/src/expr/limit.c +++ b/src/expr/limit.c @@ -183,14 +183,14 @@ nft_rule_expr_limit_snprintf(char *buf, size_t len, uint32_t type, struct nft_expr_limit *limit = nft_expr_data(e); switch(type) { - case NFT_RULE_O_DEFAULT: + case NFT_OUTPUT_DEFAULT: return snprintf(buf, len, "rate %"PRIu64"/%s ", limit->rate, get_unit(limit->unit)); - case NFT_RULE_O_XML: + case NFT_OUTPUT_XML: return snprintf(buf, len, "%"PRIu64"" "%"PRIu64"", limit->rate, limit->unit); - case NFT_RULE_O_JSON: + case NFT_OUTPUT_JSON: return snprintf(buf, len, "\"rate\":%"PRIu64"," "\"unit\":%"PRIu64"", limit->rate, limit->unit); -- cgit v1.2.3