]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: sample: Small fix in function check_operator for eror reporting
authorLokesh Jindal <15ljindal@gmail.com>
Mon, 18 Sep 2023 04:05:34 +0000 (21:05 -0700)
committerWilly Tarreau <w@1wt.eu>
Fri, 22 Sep 2023 06:48:53 +0000 (08:48 +0200)
When function "check_operator" calls function "vars_check_arg" to decode
a variable, it passes in NULL value for pointer to the char array meant
for capturing the error message.  This commit replaces NULL with the
pointer to the real char array.  This should help in correct error
reporting.

src/sample.c

index bb7db28e797798e17f27b9f0f8e0bd360b78f65c..6e860f31ee56dceeefda152807cb9760d318ba69 100644 (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], NULL))
+       if (vars_check_arg(&args[0], err))
                return 1;
 
        /* Try to convert an integer */