From 4892fceea2b59415c9714293689f3f0d07ac5057 Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Wed, 16 Jun 2021 01:45:29 +0200 Subject: src: add queue expr and flags to queue_stmt_alloc Preparation patch to avoid too much $$ references in the parser. Signed-off-by: Florian Westphal --- src/statement.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/statement.c') diff --git a/src/statement.c b/src/statement.c index 7537c07f..a713952c 100644 --- a/src/statement.c +++ b/src/statement.c @@ -522,9 +522,15 @@ static const struct stmt_ops queue_stmt_ops = { .destroy = queue_stmt_destroy, }; -struct stmt *queue_stmt_alloc(const struct location *loc) +struct stmt *queue_stmt_alloc(const struct location *loc, struct expr *e, uint16_t flags) { - return stmt_alloc(loc, &queue_stmt_ops); + struct stmt *stmt; + + stmt = stmt_alloc(loc, &queue_stmt_ops); + stmt->queue.queue = e; + stmt->queue.flags = flags; + + return stmt; } static void quota_stmt_print(const struct stmt *stmt, struct output_ctx *octx) -- cgit v1.2.3