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