From: rousskov <> Date: Wed, 15 Aug 2007 21:07:41 +0000 (+0000) Subject: Bug 2045 fix: Do not memset StoreEntry as it comes with a virtual table. X-Git-Tag: SQUID_3_0_PRE7~63 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=f894387ae1e2c913e73fbff2ca7dfd9342beed58;p=thirdparty%2Fsquid.git Bug 2045 fix: Do not memset StoreEntry as it comes with a virtual table. --- diff --git a/src/fs/ufs/ufscommon.cc b/src/fs/ufs/ufscommon.cc index c68c810acd..cc44aff3e3 100644 --- a/src/fs/ufs/ufscommon.cc +++ b/src/fs/ufs/ufscommon.cc @@ -1,5 +1,5 @@ /* - * $Id: ufscommon.cc,v 1.13 2007/08/13 17:20:57 hno Exp $ + * $Id: ufscommon.cc,v 1.14 2007/08/15 15:07:41 rousskov Exp $ * vim: set et : * * DEBUG: section 47 Store Directory Routines @@ -285,7 +285,6 @@ RebuildState::rebuildFromDirectory() { LOCAL_ARRAY(char, hdr_buf, SM_PAGE_SIZE); currentEntry(NULL); - StoreEntry tmpe; cache_key key[MD5_DIGEST_CHARS]; struct stat sb; @@ -362,7 +361,8 @@ RebuildState::rebuildFromDirectory() debugs(47, 3, "commonUfsDirRebuildFromDirectory: successful swap meta unpacking"); memset(key, '\0', MD5_DIGEST_CHARS); - memset(&tmpe, '\0', sizeof(StoreEntry)); + + StoreEntry tmpe; InitStoreEntry visitor(&tmpe, key); for_each(*tlv_list, visitor); storeSwapTLVFree(tlv_list);