]> git.kaiwu.me - haproxy.git/commit
CLEANUP: cfgparse: cascade the warnif_misplaced_* rules
authorWilly Tarreau <w@1wt.eu>
Fri, 25 Nov 2016 14:16:12 +0000 (15:16 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 25 Nov 2016 14:16:12 +0000 (15:16 +0100)
commitd39ad449b950bf9c1fdc9c71f7e6dc14d4105510
treef77581e95a6570ab29fac97983345734682ceea0
parentae9bea0591a018e2dcb9b8c0c1a2679975956501
CLEANUP: cfgparse: cascade the warnif_misplaced_* rules

There are 8 functions each repeating what another does and adding one
extra test. We used to have some copy-paste issues in the past due to
this. Instead we now make them simply rely on the previous one and add
the final test. It's much better and much safer. The functions could
be moved to inlines but they're used at a few other locations only,
it didn't make much sense in the end.
src/cfgparse.c