MINOR: sample: make sample_parse_expr() use memprintf() to report parse errors
Doing so ensures that we're consistent between all the functions in the whole
chain. This is important so that we can extract the argument parsing from this
function.
diff --git a/src/proto_tcp.c b/src/proto_tcp.c
index 6593ce1..2b6fbc7 100644
--- a/src/proto_tcp.c
+++ b/src/proto_tcp.c
@@ -1241,11 +1241,11 @@
arg++;
curpx->conf.args.ctx = ARGC_TRK;
- expr = sample_parse_expr(args, &arg, trash.str, trash.size, &curpx->conf.args);
+ expr = sample_parse_expr(args, &arg, err, &curpx->conf.args);
if (!expr) {
memprintf(err,
"'%s %s %s' : %s",
- args[0], args[1], args[kw], trash.str);
+ args[0], args[1], args[kw], *err);
return -1;
}