]> git.ipfire.org Git - thirdparty/libnftnl.git/commitdiff
expr: queue: remove redundant NFTNL_EXPR_QUEUE_NUM set in json parse
authorLiping Zhang <liping.zhang@spreadtrum.com>
Sun, 11 Sep 2016 14:11:22 +0000 (22:11 +0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 12 Sep 2016 18:01:35 +0000 (20:01 +0200)
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>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/expr/queue.c

index 522231b070340a84bd3b71fcfb26210e0d8031d6..033c542c54b7655ee966bd9043a60ea579e058f1 100644 (file)
@@ -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);