]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: acl: fix the initialization order of the ACL expression
authorWilly Tarreau <w@1wt.eu>
Fri, 13 Dec 2013 00:24:09 +0000 (01:24 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 13 Dec 2013 00:35:08 +0000 (01:35 +0100)
commitc37a3c770b4ed6cd94c168691e44fd5bc4dd4197
tree63d9f0ac1519aa99d15896303c4fe0d3fd6c1640
parent131b466f9873f9bd9216216721babf77394abcf2
MEDIUM: acl: fix the initialization order of the ACL expression

The ACL expression parser recently became a huge mess like a
spaghetti plate. The keyword is looked up at the beginning, then
sample fetches are processed, then an expression is initialized,
then arguments and converters are parsed but only if the keyword
was an ACL one, etc... Lots of "if" and redundant variables
everywhere making it hard to read and follow.

Let's move the args/conv parsing just after the keyword lookup.
At least now it's consistent that when we leave this if/else
statement, we have a sample expression initialized and full
parsed wherever the elements came from.
src/acl.c