diff options
author | Florian Westphal <fw@strlen.de> | 2021-06-16 01:45:29 +0200 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2021-06-21 14:44:58 +0200 |
commit | 4892fceea2b59415c9714293689f3f0d07ac5057 (patch) | |
tree | 3b41511008eaa8a5ca9f8817eba01cea2448e4be /src/netlink_delinearize.c | |
parent | 767f0af82a3896a9a643de281cb020d04a7b7cf0 (diff) |
src: add queue expr and flags to queue_stmt_alloc
Preparation patch to avoid too much $<stmt>$ references in the parser.
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'src/netlink_delinearize.c')
-rw-r--r-- | src/netlink_delinearize.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/netlink_delinearize.c b/src/netlink_delinearize.c index 58daa4e0..58497809 100644 --- a/src/netlink_delinearize.c +++ b/src/netlink_delinearize.c @@ -1467,9 +1467,8 @@ static void netlink_parse_queue(struct netlink_parse_ctx *ctx, const struct location *loc, const struct nftnl_expr *nle) { + uint16_t num, total, flags; struct expr *expr, *high; - struct stmt *stmt; - uint16_t num, total; num = nftnl_expr_get_u16(nle, NFTNL_EXPR_QUEUE_NUM); total = nftnl_expr_get_u16(nle, NFTNL_EXPR_QUEUE_TOTAL); @@ -1483,11 +1482,8 @@ static void netlink_parse_queue(struct netlink_parse_ctx *ctx, expr = range_expr_alloc(loc, expr, high); } - stmt = queue_stmt_alloc(loc); - stmt->queue.queue = expr; - stmt->queue.flags = nftnl_expr_get_u16(nle, NFTNL_EXPR_QUEUE_FLAGS); - - ctx->stmt = stmt; + flags = nftnl_expr_get_u16(nle, NFTNL_EXPR_QUEUE_FLAGS); + ctx->stmt = queue_stmt_alloc(loc, expr, flags); } struct dynset_parse_ctx { |