Revert "MEDIUM: sample: Small fix in function check_operator for eror reporting"
authorRemi Tricot-Le Breton <rlebreton@haproxy.com>
Mon, 2 Oct 2023 15:46:54 +0000 (17:46 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 3 Oct 2023 09:13:10 +0000 (11:13 +0200)
commit6fe57303f701dcd67f6efc7f5a894b3180f54b93
treefb8232e5d5c2a2bce9d560c6e5dc89387adb4973
parent7c69c9b51f61a28dbb44599a176eaa0e54467013
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'.
src/sample.c