Fixed Coverity errors
This commit is contained in:
@@ -37,7 +37,9 @@ class RandomBytes
|
||||
public:
|
||||
RandomBytes() : rng(RandomDeviceSeed::instance), dist(0, 255)
|
||||
{
|
||||
uv_mutex_init_checked(&m);
|
||||
if (uv_mutex_init(&m) != 0) {
|
||||
abort();
|
||||
}
|
||||
|
||||
// Diffuse the initial state in case it has low quality
|
||||
rng.discard(10000);
|
||||
|
||||
@@ -178,7 +178,7 @@ void P2PServer::clear_cached_blocks()
|
||||
return;
|
||||
}
|
||||
|
||||
for (auto it : *m_cachedBlocks) {
|
||||
for (const auto& it : *m_cachedBlocks) {
|
||||
delete it.second;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user