From: Willy Tarreau Date: Sat, 26 Apr 2014 10:37:25 +0000 (+0200) Subject: BUG/MEDIUM: pattern: a typo breaks automatic acl/map numbering X-Git-Tag: v1.5-dev25~72 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3b786968584b57659e86964739283b55acfc49da;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: pattern: a typo breaks automatic acl/map numbering Dmitry Sivachenko reported that nice warning : src/pattern.c:2243:43: warning: if statement has empty body [-Wempty-body] if (&ref2->list == &pattern_reference); ^ src/pattern.c:2243:43: note: put the semicolon on a separate line to silence this warning It was merged as is with the code from commit af5a29d ("MINOR: pattern: Each pattern is identified by unique id"). So it looks like we can reassign an ID which is still in use because of this. --- diff --git a/src/pattern.c b/src/pattern.c index 16aa09fbb7..5ebb5ce818 100644 --- a/src/pattern.c +++ b/src/pattern.c @@ -2240,7 +2240,7 @@ void pattern_finalize_config(void) break; } } - if (&ref2->list == &pattern_reference); + if (&ref2->list == &pattern_reference) break; }