[libnftnl PATCH 1/3] expr: immediate: Use nft_rule_expr_set_* in the xml parsing code

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

 



Code refactoring to use nft_rule_expr_set_* in parse functions.

Signed-off-by: Ana Rey <anarey@xxxxxxxxx>
---
 src/expr/immediate.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/expr/immediate.c b/src/expr/immediate.c
index 2ea4636..eab1497 100644
--- a/src/expr/immediate.c
+++ b/src/expr/immediate.c
@@ -229,9 +229,7 @@ nft_rule_expr_immediate_xml_parse(struct nft_rule_expr *e, mxml_node_t *tree,
 	if (nft_mxml_reg_parse(tree, "dreg", &reg, MXML_DESCEND_FIRST,
 			       NFT_XML_MAND, err) != 0)
 		return -1;
-
-	imm->dreg = reg;
-	e->flags |= (1 << NFT_EXPR_IMM_DREG);
+	nft_rule_expr_set_u32(e, NFT_EXPR_IMM_DREG, reg);
 
 	datareg_type = nft_mxml_data_reg_parse(tree, "immediatedata",
 					       &imm->data, NFT_XML_MAND, err);
-- 
2.0.0

--
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