From: Source Maintenance Date: Thu, 1 Dec 2016 00:12:03 +0000 (+0000) Subject: SourceFormat Enforcement X-Git-Tag: M-staged-PR71~355 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=85fd48c8d4adb2f4b38aaf6e187bbc209dab7fbf;p=thirdparty%2Fsquid.git SourceFormat Enforcement --- diff --git a/src/acl/RegexData.cc b/src/acl/RegexData.cc index 91314b48e7..6d1b26ff8b 100644 --- a/src/acl/RegexData.cc +++ b/src/acl/RegexData.cc @@ -21,8 +21,8 @@ #include "base/RegexPattern.h" #include "ConfigParser.h" #include "Debug.h" -#include "sbuf/List.h" #include "sbuf/Algorithms.h" +#include "sbuf/List.h" ACLRegexData::~ACLRegexData() { @@ -126,13 +126,13 @@ compileRE(std::list &curlist, const char * RE, int flags) static bool compileRE(std::list &curlist, const SBufList &RE, int flags) { - if (RE.empty()) - return curlist.empty(); // XXX: old code did this. It looks wrong. - SBuf regexp; - static const SBuf openparen("("), closeparen(")"), separator(")|("); - JoinContainerIntoSBuf(regexp, RE.begin(), RE.end(), separator, openparen, - closeparen); - return compileRE(curlist, regexp.c_str(), flags); + if (RE.empty()) + return curlist.empty(); // XXX: old code did this. It looks wrong. + SBuf regexp; + static const SBuf openparen("("), closeparen(")"), separator(")|("); + JoinContainerIntoSBuf(regexp, RE.begin(), RE.end(), separator, openparen, + closeparen); + return compileRE(curlist, regexp.c_str(), flags); } /** Compose and compile one large RE from a set of (small) REs.