From: Remi Tricot-Le Breton Date: Thu, 16 Dec 2021 16:14:35 +0000 (+0100) Subject: MINOR: vars: Set variable type to ANY upon creation X-Git-Tag: v2.6-dev1~286 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1bd98050853357bd8b2b482772fab3ba14148404;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/vars.c b/src/vars.c index 4c5f88b896..27fc23d11d 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. */