------------------------------------------------------------ revno: 13229 revision-id: squid3@treenet.co.nz-20140114211623-5lamcbiw8w0bd2lc parent: kinkie@squid-cache.org-20140114203603-bdstvoa23bfqbs5u committer: Amos Jeffries branch nick: trunk timestamp: Wed 2014-01-15 10:16:23 +1300 message: Fix MemMapSlot constructor initialization of expiry TTL Also, restyle MemMap constructor initialization list. Detected by Coverity Scan. Issue 1153961. ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20140114211623-5lamcbiw8w0bd2lc # target_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # testament_sha1: 0a3b237aa94f52a2958a1e8ad73a1d40fa3dd64a # timestamp: 2014-01-14 21:56:28 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # base_revision_id: kinkie@squid-cache.org-20140114203603-\ # bdstvoa23bfqbs5u # # Begin patch === modified file 'src/ipc/MemMap.cc' --- src/ipc/MemMap.cc 2014-01-12 17:15:45 +0000 +++ src/ipc/MemMap.cc 2014-01-14 21:16:23 +0000 @@ -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::MemMapSlot */ -Ipc::MemMapSlot::MemMapSlot() +Ipc::MemMapSlot::MemMapSlot() : + pSize(0), + expire(0) { memset(key, 0, sizeof(key)); memset(p, 0, sizeof(p)); - pSize = 0; } void