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.
This commit is contained in:
Remi Tricot-Le Breton 2021-12-16 17:14:35 +01:00 committed by Willy Tarreau
parent 7055301934
commit 1bd9805085

View File

@ -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. */