From: Francesco Chemolli Date: Mon, 31 Dec 2012 10:52:17 +0000 (+0100) Subject: Completed initializer for constructors of Adaptation::Config and AsyncJob X-Git-Tag: SQUID_3_4_0_1~405 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c9568681cae7616854100f647f3cc1f2fede267c;p=thirdparty%2Fsquid.git Completed initializer for constructors of Adaptation::Config and AsyncJob --- diff --git a/src/adaptation/Config.cc b/src/adaptation/Config.cc index 5d233593d0..a5edde2dec 100644 --- a/src/adaptation/Config.cc +++ b/src/adaptation/Config.cc @@ -295,10 +295,10 @@ Adaptation::Config::DumpAccess(StoreEntry *entry, const char *name) } } -Adaptation::Config::Config() -{ - // XXX: should we init members? -} +Adaptation::Config::Config() : + onoff(0), service_failure_limit(0), oldest_service_failure(0), + service_revival_delay(0) +{} // XXX: this is called for ICAP and eCAP configs, but deals mostly // with global arrays shared by those individual configs diff --git a/src/adaptation/icap/Config.cc b/src/adaptation/icap/Config.cc index 7fd6798e52..b7879fbff2 100644 --- a/src/adaptation/icap/Config.cc +++ b/src/adaptation/icap/Config.cc @@ -43,16 +43,17 @@ Adaptation::Icap::Config Adaptation::Icap::TheConfig; -Adaptation::Icap::Config::Config(): preview_enable(0), preview_size(0), - allow206_enable(0), +Adaptation::Icap::Config::Config() : + preview_enable(0), preview_size(0), allow206_enable(0), connect_timeout_raw(0), io_timeout_raw(0), reuse_connections(0), - client_username_header(NULL), client_username_encode(0), repeat(NULL) + client_username_header(NULL), client_username_encode(0), repeat(NULL), + repeat_limit(0) { } Adaptation::Icap::Config::~Config() { - // TODO: delete client_username_header? + // no need to free client_username_header, it's done in cf_parser.cci:free_all } Adaptation::ServicePointer diff --git a/src/base/AsyncJob.cc b/src/base/AsyncJob.cc index 04f688d082..8e5afaf77c 100644 --- a/src/base/AsyncJob.cc +++ b/src/base/AsyncJob.cc @@ -21,7 +21,8 @@ AsyncJob::Pointer AsyncJob::Start(AsyncJob *j) return job; } -AsyncJob::AsyncJob(const char *aTypeName): typeName(aTypeName), inCall(NULL) +AsyncJob::AsyncJob(const char *aTypeName) : + stopReason(NULL), typeName(aTypeName), inCall(NULL) { debugs(93,5, "AsyncJob constructed, this=" << this << " type=" << typeName << " [" << id << ']');