From: Amos Jeffries Date: Tue, 14 Jan 2014 21:16:23 +0000 (+1300) Subject: Fix MemMapSlot constructor initialization of expiry TTL X-Git-Tag: SQUID_3_5_0_1~416 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f321944d03974d3ab1468ef2e293eb62329777e4;p=thirdparty%2Fsquid.git Fix MemMapSlot constructor initialization of expiry TTL Also, restyle MemMap constructor initialization list. Detected by Coverity Scan. Issue 1153961. --- diff --git a/src/ipc/MemMap.cc b/src/ipc/MemMap.cc index 18c05c81af..1b6a6a3665 100644 --- a/src/ipc/MemMap.cc +++ b/src/ipc/MemMap.cc @@ -7,8 +7,10 @@ #include "store_key_md5.h" #include "tools.h" -Ipc::MemMap::MemMap(const char *const aPath): cleaner(NULL), path(aPath), - shared(shm_old(Shared)(aPath)) +Ipc::MemMap::MemMap(const char *const aPath) : + cleaner(NULL), + path(aPath), + shared(shm_old(Shared)(aPath)) { assert(shared->limit > 0); // we should not be created otherwise debugs(54, 5, "attached map [" << path << "] created: " << @@ -272,11 +274,12 @@ Ipc::MemMap::freeLocked(Slot &s, bool keepLocked) } /* Ipc::MemMapSlot */ -Ipc::MemMapSlot::MemMapSlot() +Ipc::MemMapSlot::MemMapSlot() : + pSize(0), + expire(0) { memset(key, 0, sizeof(key)); memset(p, 0, sizeof(p)); - pSize = 0; } void