Revert "MEDIUM: sample: Small fix in function check_operator for eror reporting"

This reverts commit d897d7da87b8894866572c56e9c495a2b290620a.

The "check_operator" function is used for all the operator converters
such as "and", "or", "add"...
With such a converter that accepts a variable name as well as an
integer, the "vars_check_arg" call is expected to fail when an integer
is provided. Passing an "err" variable has the unwanted side effect of
raising a warning during init for a configuration such as the following:

    http-request set-query "s=%[rand,add(20)]"

which raises the following warning:
    [WARNING]  (33040) : config : parsing [hap.cfg:14] : invalid
    variable name '20'. A variable name must be start by its scope. The
    scope can be 'proc', 'sess', 'txn', 'req', 'res' or 'check'.
This commit is contained in:
Remi Tricot-Le Breton 2023-10-02 17:46:54 +02:00 committed by Willy Tarreau
parent 7c69c9b51f
commit 6fe57303f7

View File

@ -3156,7 +3156,7 @@ static int check_operator(struct arg *args, struct sample_conv *conv,
long long int i;
/* Try to decode a variable. */
if (vars_check_arg(&args[0], err))
if (vars_check_arg(&args[0], NULL))
return 1;
/* Try to convert an integer */