From 1bd98050853357bd8b2b482772fab3ba14148404 Mon Sep 17 00:00:00 2001 From: Remi Tricot-Le Breton Date: Thu, 16 Dec 2021 17:14:35 +0100 Subject: [PATCH] MINOR: vars: Set variable type to ANY upon creation The type of a newly created variable was not initialized. This patch sets it to SMP_T_ANY by default. This will be required when conditions can be added to a set-var call because we might end up creating a variable without setting it yet. --- src/vars.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vars.c b/src/vars.c index 4c5f88b89..27fc23d11 100644 --- a/src/vars.c +++ b/src/vars.c @@ -364,6 +364,7 @@ static int var_set(uint64_t name_hash, enum vars_scope scope, struct sample *smp LIST_APPEND(&vars->head, &var->l); var->name_hash = name_hash; var->flags = flags & VF_PERMANENT; + var->data.type = SMP_T_ANY; } /* Set type. */