]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: pattern: do not assign SMP_TYPES by default to patterns
authorWilly Tarreau <w@1wt.eu>
Thu, 12 Dec 2013 10:34:55 +0000 (11:34 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 12 Dec 2013 14:42:11 +0000 (15:42 +0100)
This is never used since we exit on parse failure, and it's confusing.

src/acl.c
src/pattern.c

index be2095998c9c001ff659f4386512759c1b4abbd9..974e9196f93a0fd5c6348e1c0230b8980492a502 100644 (file)
--- a/src/acl.c
+++ b/src/acl.c
@@ -507,7 +507,6 @@ struct acl_expr *parse_acl_expr(const char **args, char **err, struct arg_list *
                }
                pattern->flags = patflags;
 
-               pattern->type = SMP_TYPES; /* unspecified type */
                ret = expr->pat.parse(args, pattern, NULL, &opaque, err);
                if (!ret)
                        goto out_free_pattern;
index 084f73a86c5124391034e8a554fa44ff327b22d3..6c2a5bac4593b500e2343e69a14c6f18f1961282 100644 (file)
@@ -860,7 +860,6 @@ int pattern_register(struct pattern_expr *expr, char *text,
                (*pattern)->val.tree = &expr->pattern_tree;
        }
 
-       (*pattern)->type = SMP_TYPES; /* unspecified type by default */
        if (!expr->parse(args, *pattern, smp, &opaque, err))
                return -1;