From 821721aa5880310635522db50011833895c70aa6 Mon Sep 17 00:00:00 2001
From: Lokesh Jindal <15ljindal@gmail.com>
Date: Sun, 17 Sep 2023 21:05:34 -0700
Subject: [PATCH] MEDIUM: sample: Small fix in function check_operator for
 eror reporting

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/sample.c b/src/sample.c
index be08ea718..f2aa5b2a7 100644
--- a/src/sample.c
+++ b/src/sample.c
@@ -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 */
-- 
2.27.0

