------------------------------------------------------------ revno: 12421 revision-id: squid3@treenet.co.nz-20121202072332-yloe8uqifyfx4ah2 parent: squid3@treenet.co.nz-20121129103843-pcr947v744puqt15 committer: Amos Jeffries branch nick: 3.3 timestamp: Sun 2012-12-02 00:23:32 -0700 message: Remove unnecessary xmemset() Was a simple wrapper around memset() to add debugs() traces. However other profiling tools can trace memset far better. ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20121202072332-yloe8uqifyfx4ah2 # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.3 # testament_sha1: 7c9cfc8826d235ba6bd912aeb800fa9e9ce4a15e # timestamp: 2012-12-02 07:27:50 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.3 # base_revision_id: squid3@treenet.co.nz-20121129103843-\ # pcr947v744puqt15 # # Begin patch === modified file 'src/DiskIO/DiskDaemon/DiskdAction.cc' --- src/DiskIO/DiskDaemon/DiskdAction.cc 2012-09-01 14:38:36 +0000 +++ src/DiskIO/DiskDaemon/DiskdAction.cc 2012-12-02 07:23:32 +0000 @@ -15,7 +15,7 @@ DiskdActionData::DiskdActionData() { - xmemset(this, 0, sizeof(*this)); + memset(this, 0, sizeof(*this)); } DiskdActionData& === modified file 'src/StoreStats.cc' --- src/StoreStats.cc 2012-09-01 14:38:36 +0000 +++ src/StoreStats.cc 2012-12-02 07:23:32 +0000 @@ -11,7 +11,7 @@ StoreInfoStats::StoreInfoStats() { - xmemset(this, 0, sizeof(*this)); + memset(this, 0, sizeof(*this)); } StoreInfoStats & @@ -52,6 +52,6 @@ StoreIoStats::StoreIoStats() { - xmemset(this, 0, sizeof(*this)); + memset(this, 0, sizeof(*this)); } === modified file 'src/ipc/SharedListen.cc' --- src/ipc/SharedListen.cc 2012-08-31 16:57:39 +0000 +++ src/ipc/SharedListen.cc 2012-12-02 07:23:32 +0000 @@ -45,7 +45,7 @@ Ipc::OpenListenerParams::OpenListenerParams() { - xmemset(this, 0, sizeof(*this)); + memset(this, 0, sizeof(*this)); } bool === modified file 'src/ipc/StoreMap.cc' --- src/ipc/StoreMap.cc 2012-10-16 23:46:07 +0000 +++ src/ipc/StoreMap.cc 2012-12-02 07:23:32 +0000 @@ -270,8 +270,8 @@ Ipc::StoreMapSlot::StoreMapSlot(): state(Empty) { - xmemset(&key, 0, sizeof(key)); - xmemset(&basics, 0, sizeof(basics)); + memset(&key, 0, sizeof(key)); + memset(&basics, 0, sizeof(basics)); } void === modified file 'src/ipc/TypedMsgHdr.cc' --- src/ipc/TypedMsgHdr.cc 2012-09-01 14:38:36 +0000 +++ src/ipc/TypedMsgHdr.cc 2012-12-02 07:23:32 +0000 @@ -12,7 +12,7 @@ Ipc::TypedMsgHdr::TypedMsgHdr() { - xmemset(this, 0, sizeof(*this)); + memset(this, 0, sizeof(*this)); sync(); } @@ -204,7 +204,7 @@ void Ipc::TypedMsgHdr::prepForReading() { - xmemset(this, 0, sizeof(*this)); + memset(this, 0, sizeof(*this)); allocName(); allocData(); allocControl(); === modified file 'src/mgr/CountersAction.cc' --- src/mgr/CountersAction.cc 2012-10-04 09:14:06 +0000 +++ src/mgr/CountersAction.cc 2012-12-02 07:23:32 +0000 @@ -17,7 +17,7 @@ Mgr::CountersActionData::CountersActionData() { - xmemset(this, 0, sizeof(*this)); + memset(this, 0, sizeof(*this)); } Mgr::CountersActionData& === modified file 'src/mgr/InfoAction.cc' --- src/mgr/InfoAction.cc 2012-10-04 09:14:06 +0000 +++ src/mgr/InfoAction.cc 2012-12-02 07:23:32 +0000 @@ -25,7 +25,7 @@ Mgr::InfoActionData::InfoActionData() { - xmemset(this, 0, sizeof(*this)); + memset(this, 0, sizeof(*this)); } Mgr::InfoActionData& === modified file 'src/mgr/IntervalAction.cc' --- src/mgr/IntervalAction.cc 2012-10-04 09:14:06 +0000 +++ src/mgr/IntervalAction.cc 2012-12-02 07:23:32 +0000 @@ -17,7 +17,7 @@ Mgr::IntervalActionData::IntervalActionData() { - xmemset(this, 0, sizeof(*this)); + memset(this, 0, sizeof(*this)); } Mgr::IntervalActionData& === modified file 'src/mgr/IoAction.cc' --- src/mgr/IoAction.cc 2012-10-04 09:14:06 +0000 +++ src/mgr/IoAction.cc 2012-12-02 07:23:32 +0000 @@ -18,7 +18,7 @@ Mgr::IoActionData::IoActionData() { - xmemset(this, 0, sizeof(*this)); + memset(this, 0, sizeof(*this)); } Mgr::IoActionData& === modified file 'src/mgr/ServiceTimesAction.cc' --- src/mgr/ServiceTimesAction.cc 2012-10-04 09:14:06 +0000 +++ src/mgr/ServiceTimesAction.cc 2012-12-02 07:23:32 +0000 @@ -16,7 +16,7 @@ Mgr::ServiceTimesActionData::ServiceTimesActionData() { - xmemset(this, 0, sizeof(*this)); + memset(this, 0, sizeof(*this)); } Mgr::ServiceTimesActionData& === modified file 'src/mgr/StoreIoAction.cc' --- src/mgr/StoreIoAction.cc 2012-09-01 14:38:36 +0000 +++ src/mgr/StoreIoAction.cc 2012-12-02 07:23:32 +0000 @@ -13,7 +13,7 @@ Mgr::StoreIoActionData::StoreIoActionData() { - xmemset(this, 0, sizeof(*this)); + memset(this, 0, sizeof(*this)); } Mgr::StoreIoActionData& === modified file 'src/snmp/Pdu.cc' --- src/snmp/Pdu.cc 2012-09-01 14:38:36 +0000 +++ src/snmp/Pdu.cc 2012-12-02 07:23:32 +0000 @@ -41,7 +41,7 @@ void Snmp::Pdu::init() { - xmemset(this, 0, sizeof(*this)); + memset(this, 0, sizeof(*this)); errstat = SNMP_DEFAULT_ERRSTAT; errindex = SNMP_DEFAULT_ERRINDEX; } === modified file 'src/snmp/Session.cc' --- src/snmp/Session.cc 2012-09-01 14:38:36 +0000 +++ src/snmp/Session.cc 2012-12-02 07:23:32 +0000 @@ -35,7 +35,7 @@ void Snmp::Session::clear() { - xmemset(this, 0, sizeof(*this)); + memset(this, 0, sizeof(*this)); } void === modified file 'src/snmp/Var.cc' --- src/snmp/Var.cc 2012-09-03 08:58:40 +0000 +++ src/snmp/Var.cc 2012-12-02 07:23:32 +0000 @@ -40,7 +40,7 @@ void Snmp::Var::init() { - xmemset(this, 0, sizeof(*this)); + memset(this, 0, sizeof(*this)); } Snmp::Var& === modified file 'src/tests/stub_tools.cc' --- src/tests/stub_tools.cc 2012-10-05 13:10:15 +0000 +++ src/tests/stub_tools.cc 2012-12-02 07:23:32 +0000 @@ -66,10 +66,3 @@ void strwordquote(MemBuf * mb, const char *str) STUB void keepCapabilities(void) STUB void restoreCapabilities(int keep) STUB - -void* -xmemset(void* dst, int val, size_t sz) -{ - assert(dst); - return memset(dst, val, sz); -} === modified file 'src/tools.cc' --- src/tools.cc 2012-11-29 10:26:58 +0000 +++ src/tools.cc 2012-12-02 07:23:32 +0000 @@ -1293,13 +1293,3 @@ Ip::Interceptor.StopTransparency("Missing needed capability support."); #endif /* HAVE_SYS_CAPABILITY_H */ } - -void * -xmemset(void *dst, int val, size_t sz) -{ - // do debugs output - debugs(63, 9, "memset: dst=" << dst << ", val=" << val << ", bytes=" << sz); - - // call the system one to do the actual work ~safely. - return memset(dst, val, sz); -} === modified file 'src/tools.h' --- src/tools.h 2012-09-21 14:57:30 +0000 +++ src/tools.h 2012-12-02 07:23:32 +0000 @@ -91,7 +91,6 @@ String ProcessRoles(); void debug_trap(const char *); -void *xmemset(void *dst, int, size_t); void logsFlush(void);