[libnftnl PATCH v4 1/3] expr: log: Rename variables in nft_rule_expr_log_json_parse functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Renames some variables for code readability reasons.

Signed-off-by: Ana Rey <anarey@xxxxxxxxx>
---
 src/expr/log.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/expr/log.c b/src/expr/log.c
index a61a8d3..eaba1d6 100644
--- a/src/expr/log.c
+++ b/src/expr/log.c
@@ -166,7 +166,8 @@ static int nft_rule_expr_log_json_parse(struct nft_rule_expr *e, json_t *root,
 #ifdef JSON_PARSING
 	const char *prefix;
 	uint32_t snaplen;
-	uint16_t uval16;
+	uint16_t group;
+	uint16_t qthreshold;
 
 	prefix = nft_jansson_parse_str(root, "prefix", err);
 	if (prefix == NULL)
@@ -174,11 +175,11 @@ static int nft_rule_expr_log_json_parse(struct nft_rule_expr *e, json_t *root,
 
 	nft_rule_expr_set_str(e, NFT_EXPR_LOG_PREFIX, prefix);
 
-	if (nft_jansson_parse_val(root, "group", NFT_TYPE_U16, &uval16,
+	if (nft_jansson_parse_val(root, "group", NFT_TYPE_U16, &group,
 				  err) < 0)
 		return -1;
 
-	nft_rule_expr_set_u16(e, NFT_EXPR_LOG_GROUP, uval16);
+	nft_rule_expr_set_u16(e, NFT_EXPR_LOG_GROUP, group);
 
 	if (nft_jansson_parse_val(root, "snaplen", NFT_TYPE_U32, &snaplen,
 				  err) < 0)
@@ -187,10 +188,10 @@ static int nft_rule_expr_log_json_parse(struct nft_rule_expr *e, json_t *root,
 	nft_rule_expr_set_u32(e, NFT_EXPR_LOG_SNAPLEN, snaplen);
 
 	if (nft_jansson_parse_val(root, "qthreshold", NFT_TYPE_U16,
-				  &uval16, err) < 0)
+				  &qthreshold, err) < 0)
 		return -1;
 
-	nft_rule_expr_set_u16(e, NFT_EXPR_LOG_QTHRESHOLD, uval16);
+	nft_rule_expr_set_u16(e, NFT_EXPR_LOG_QTHRESHOLD, qthreshold);
 
 	return 0;
 #else
-- 
2.0.0.rc2

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux