From e2a8fbf020cb6f37ea1a97c664593493e8a163af Mon Sep 17 00:00:00 2001 From: Alden Torres Date: Tue, 11 Sep 2018 12:19:47 -0400 Subject: [PATCH] cleanup of special code for valgrind --- src/torrent.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/torrent.cpp b/src/torrent.cpp index 48334a114..aed149e8e 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -6264,11 +6264,6 @@ bool is_downloading_state(int const st) const int blocks_per_piece = m_picker->blocks_in_piece(piece_index_t(0)); blk.resize(q.size() * aux::numeric_cast(blocks_per_piece)); - // for some weird reason valgrind claims these are uninitialized - // unless it's zeroed out here (block_info has a construct that's - // supposed to initialize it) - if (!blk.empty()) - std::memset(blk.data(), 0, sizeof(blk[0]) * blk.size()); int counter = 0; for (auto i = q.begin(); i != q.end(); ++i, ++counter)