diff mbox

[libnftnl,1/3] expr: queue: remove redundant NFTNL_EXPR_QUEUE_NUM set in json parse

Message ID 1473603084-33964-2-git-send-email-zlpnobody@163.com
State Accepted
Delegated to: Pablo Neira
Headers show

Commit Message

Liping Zhang Sept. 11, 2016, 2:11 p.m. UTC
From: Liping Zhang <liping.zhang@spreadtrum.com>

We have already set NFTNL_EXPR_QUEUE_NUM when parse "num" successfully,
here is wrong and redundant, remove it.

Signed-off-by: Liping Zhang <liping.zhang@spreadtrum.com>
---
 src/expr/queue.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Pablo Neira Ayuso Sept. 12, 2016, 6:01 p.m. UTC | #1
On Sun, Sep 11, 2016 at 10:11:22PM +0800, Liping Zhang wrote:
> From: Liping Zhang <liping.zhang@spreadtrum.com>
> 
> We have already set NFTNL_EXPR_QUEUE_NUM when parse "num" successfully,
> here is wrong and redundant, remove it.

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

Patch

diff --git a/src/expr/queue.c b/src/expr/queue.c
index 522231b..033c542 100644
--- a/src/expr/queue.c
+++ b/src/expr/queue.c
@@ -136,7 +136,6 @@  nftnl_expr_queue_json_parse(struct nftnl_expr *e, json_t *root,
 
 	if (nftnl_jansson_parse_val(root, "num", NFTNL_TYPE_U16, &type, err) == 0)
 		nftnl_expr_set_u16(e, NFTNL_EXPR_QUEUE_NUM, type);
-	nftnl_expr_set_u16(e, NFTNL_EXPR_QUEUE_NUM, type);
 
 	if (nftnl_jansson_parse_val(root, "total", NFTNL_TYPE_U16, &code, err) == 0)
 		nftnl_expr_set_u16(e, NFTNL_EXPR_QUEUE_TOTAL, code);