From f22a50836def254c778278f3f231fd77e853e886 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 19 Oct 2012 16:47:23 +0200 Subject: [PATCH] MINOR: sample: accept fetch keywords without parenthesis fetch keywords which support arguments do not support being called without parenthesis even if all arguments are optional. Let's fix this to allow fetch keywords without parenthesis as is already done in ACLs. --- src/sample.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sample.c b/src/sample.c index 3703a44b4..3e0c96501 100644 --- a/src/sample.c +++ b/src/sample.c @@ -354,7 +354,7 @@ struct sample_expr *sample_parse_expr(char **str, int *idx, char *err, int err_s goto out_error; } } - else if (fetch->arg_mask) { + else if (ARGM(fetch->arg_mask)) { p = my_strndup(str[*idx], endw - str[*idx]); if (p) { snprintf(err, err_size, "missing args for fetch method '%s'.", p);