From: Amos Jeffries Date: Fri, 25 Jan 2013 10:52:46 +0000 (-0700) Subject: Polish: initialize the main PortCfg pointers X-Git-Tag: SQUID_3_4_0_1~348 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04f0004e0d593ce9d390ce18ec1abe1237f8c81b;p=thirdparty%2Fsquid.git Polish: initialize the main PortCfg pointers * Only the main pointers for now, the rest can wait on some additional cleanup patches undergoing testing. Fixes defects detected by Coverity Scan. Issue 740501 and some of 740535 --- diff --git a/src/anyp/PortCfg.cc b/src/anyp/PortCfg.cc index 8a90b72226..3025c2284a 100644 --- a/src/anyp/PortCfg.cc +++ b/src/anyp/PortCfg.cc @@ -13,14 +13,15 @@ CBDATA_NAMESPACED_CLASS_INIT(AnyP, PortCfg); int NHttpSockets = 0; int HttpSockets[MAXTCPLISTENPORTS]; -AnyP::PortCfg::PortCfg(const char *aProtocol) +AnyP::PortCfg::PortCfg(const char *aProtocol) : + next(NULL), + protocol(xstrdup(aProtocol)), + name(NULL), + defaultsite(NULL) #if USE_SSL - : - dynamicCertMemCacheSize(std::numeric_limits::max()) + ,dynamicCertMemCacheSize(std::numeric_limits::max()) #endif -{ - protocol = xstrdup(aProtocol); -} +{} AnyP::PortCfg::~PortCfg() { @@ -94,7 +95,8 @@ AnyP::PortCfg::clone() const } #if USE_SSL -void AnyP::PortCfg::configureSslServerContext() +void +AnyP::PortCfg::configureSslServerContext() { if (cert) Ssl::readCertChainAndPrivateKeyFromFiles(signingCert, signPkey, certsToChain, cert, key);