]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test/perf_local.cc: init src char array before copy from it
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 2 Jun 2015 11:52:25 +0000 (13:52 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 17 Jul 2015 08:50:07 +0000 (10:50 +0200)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/test/perf_local.cc

index 2229f8b16b2fc962f2372a852c437089eb5b4f33..107d3abf5f6936f4a4830418802c698ddae8f31d 100644 (file)
@@ -520,6 +520,9 @@ double memcpy_shared(size_t size)
 {
   int count = 1000000;
   char src[size], dst[size];
+
+  memset(src, 0, sizeof(src));
+
   uint64_t start = Cycles::rdtsc();
   for (int i = 0; i < count; i++) {
     memcpy(dst, src, size);