From: squidadm Date: Tue, 3 Oct 2017 01:09:18 +0000 (+1300) Subject: SourceFormat Enforcement (#68) X-Git-Tag: M-staged-PR71~46 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=62b9cc19f273bb137fe7073d534d87573eb25aaf;p=thirdparty%2Fsquid.git SourceFormat Enforcement (#68) --- diff --git a/src/base/LruMap.h b/src/base/LruMap.h index 74cd356e76..80d9f43f4d 100644 --- a/src/base/LruMap.h +++ b/src/base/LruMap.h @@ -74,7 +74,7 @@ private: }; template - LruMap::LruMap(int aTtl, size_t aSize): entries_(0) +LruMap::LruMap(int aTtl, size_t aSize): entries_(0) { ttl = aTtl; diff --git a/src/external_acl.cc b/src/external_acl.cc index 25a4314b60..f1e8fca917 100644 --- a/src/external_acl.cc +++ b/src/external_acl.cc @@ -301,31 +301,31 @@ parse_externalAclHelper(external_acl ** list) (*fmt)->data.header.header = (*fmt)->data.string; } else #endif - if (strncmp(token,"%<{", 3) == 0) { - SBuf tmp("%parse(tmp.c_str(), "e); - assert(parsedLen == tmp.length()); - assert((*fmt)->type == Format::LFT_REPLY_HEADER || - (*fmt)->type == Format::LFT_REPLY_HEADER_ELEM); - - } else if (strncmp(token,"%>{", 3) == 0) { - SBuf tmp("%>ha"); - tmp.append(token+2); - debugs(82, DBG_PARSE_NOTE(DBG_IMPORTANT), "WARNING: external_acl_type format %>{...} is deprecated. Use " << tmp); - const size_t parsedLen = (*fmt)->parse(tmp.c_str(), "e); - assert(parsedLen == tmp.length()); - assert((*fmt)->type == Format::LFT_ADAPTED_REQUEST_HEADER || - (*fmt)->type == Format::LFT_ADAPTED_REQUEST_HEADER_ELEM); + if (strncmp(token,"%<{", 3) == 0) { + SBuf tmp("%parse(tmp.c_str(), "e); + assert(parsedLen == tmp.length()); + assert((*fmt)->type == Format::LFT_REPLY_HEADER || + (*fmt)->type == Format::LFT_REPLY_HEADER_ELEM); + + } else if (strncmp(token,"%>{", 3) == 0) { + SBuf tmp("%>ha"); + tmp.append(token+2); + debugs(82, DBG_PARSE_NOTE(DBG_IMPORTANT), "WARNING: external_acl_type format %>{...} is deprecated. Use " << tmp); + const size_t parsedLen = (*fmt)->parse(tmp.c_str(), "e); + assert(parsedLen == tmp.length()); + assert((*fmt)->type == Format::LFT_ADAPTED_REQUEST_HEADER || + (*fmt)->type == Format::LFT_ADAPTED_REQUEST_HEADER_ELEM); - } else { - // we can use the Format::Token::parse() method since it - // only pulls off one token. Since we already checked - // for '%' prefix above this is guaranteed to be a token. - const size_t len = (*fmt)->parse(token, "e); - assert(len == strlen(token)); - } + } else { + // we can use the Format::Token::parse() method since it + // only pulls off one token. Since we already checked + // for '%' prefix above this is guaranteed to be a token. + const size_t len = (*fmt)->parse(token, "e); + assert(len == strlen(token)); + } // process special token-specific actions (only if necessary) #if USE_AUTH diff --git a/src/security/cert_generators/file/certificate_db.cc b/src/security/cert_generators/file/certificate_db.cc index 09304d04df..6954297df4 100644 --- a/src/security/cert_generators/file/certificate_db.cc +++ b/src/security/cert_generators/file/certificate_db.cc @@ -664,3 +664,4 @@ Ssl::CertificateDb::ReadEntry(std::string filename, Security::CertPointer & cert (void)Ssl::ReadX509Certificate(bio, orig); return true; } + diff --git a/src/ssl/gadgets.cc b/src/ssl/gadgets.cc index 6b9a903cf5..c7331bac9a 100644 --- a/src/ssl/gadgets.cc +++ b/src/ssl/gadgets.cc @@ -920,7 +920,6 @@ const char *Ssl::getOrganization(X509 *x509) return getSubjectEntry(x509, NID_organizationName); } - bool Ssl::CertificatesCmp(const Security::CertPointer &cert1, const Security::CertPointer &cert2) { @@ -963,3 +962,4 @@ Ssl::X509_get_signature(const Security::CertPointer &cert) return cert->signature; #endif } + diff --git a/src/ssl/support.h b/src/ssl/support.h index ecbd21c674..ba48b77500 100644 --- a/src/ssl/support.h +++ b/src/ssl/support.h @@ -321,7 +321,6 @@ int asn1timeToString(ASN1_TIME *tm, char *buf, int len); */ bool setClientSNI(SSL *ssl, const char *fqdn); - /** \ingroup ServerProtocolSSLAPI * Generates a unique key based on CertificateProperties object and store it to key