DOC: sample: Add a comment in 'check_operator' to explain why 'vars_check_arg' should ignore the 'err' buffer

This extra comment ensure that we do not try to pass an 'err' argument
to 'vars_check_arg' otherwise some warnings will be raised if an
operator is given an integer directly in the configuration file.
This commit is contained in:
Remi Tricot-Le Breton 2023-10-02 17:46:55 +02:00 committed by Willy Tarreau
parent 6fe57303f7
commit b019636cd7
1 changed files with 4 additions and 1 deletions

View File

@ -3155,7 +3155,10 @@ static int check_operator(struct arg *args, struct sample_conv *conv,
const char *end;
long long int i;
/* Try to decode a variable. */
/* Try to decode a variable. The 'err' variable is intentionnaly left
* NULL since the operators accept an integer as argument in which case
* vars_check_arg call will fail.
*/
if (vars_check_arg(&args[0], NULL))
return 1;