From c9568681cae7616854100f647f3cc1f2fede267c Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Mon, 31 Dec 2012 11:52:17 +0100 Subject: [PATCH] Completed initializer for constructors of Adaptation::Config and AsyncJob --- src/adaptation/Config.cc | 8 ++++---- src/adaptation/icap/Config.cc | 9 +++++---- src/base/AsyncJob.cc | 3 ++- 3 files changed, 11 insertions(+), 9 deletions(-) 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 << ']'); -- 2.47.2