]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix MemMapSlot constructor initialization of expiry TTL
authorAmos Jeffries <squid3@treenet.co.nz>
Tue, 14 Jan 2014 21:16:23 +0000 (10:16 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Tue, 14 Jan 2014 21:16:23 +0000 (10:16 +1300)
Also, restyle MemMap constructor initialization list.

  Detected by Coverity Scan. Issue 1153961.

src/ipc/MemMap.cc

index 18c05c81af4955ff3150b4fef4fbf7c171fe0fdf..1b6a6a3665bc2b1f3f267b77c123b88d981e46e9 100644 (file)
@@ -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