mirror of
https://github.com/SChernykh/p2pool.git
synced 2024-11-17 08:17:55 +00:00
Fixed cppcheck issues
This commit is contained in:
parent
76e7e4956d
commit
7502481f26
1 changed files with 4 additions and 4 deletions
|
@ -534,7 +534,7 @@ void StratumServer::print_stratum_status() const
|
|||
int64_t dt_15m, dt_1h, dt_24h;
|
||||
|
||||
uint64_t hashes_since_last_share;
|
||||
double average_effort, diff;
|
||||
double average_effort;
|
||||
int shares_found;
|
||||
|
||||
{
|
||||
|
@ -559,7 +559,7 @@ void StratumServer::print_stratum_status() const
|
|||
dt_24h = static_cast<int64_t>(head.m_timestamp - tail_24h.m_timestamp);
|
||||
|
||||
average_effort = 0.0;
|
||||
diff = m_cumulativeFoundSharesDiff;
|
||||
const double diff = m_cumulativeFoundSharesDiff;
|
||||
if (diff > 0.0) {
|
||||
average_effort = static_cast<double>(m_cumulativeHashesAtLastShare) * 100.0 / diff;
|
||||
}
|
||||
|
@ -1202,7 +1202,7 @@ void StratumServer::api_update_local_stats(uint64_t timestamp)
|
|||
int64_t dt_15m, dt_1h, dt_24h;
|
||||
|
||||
uint64_t hashes_since_last_share;
|
||||
double average_effort, diff;
|
||||
double average_effort;
|
||||
int shares_found;
|
||||
|
||||
{
|
||||
|
@ -1227,7 +1227,7 @@ void StratumServer::api_update_local_stats(uint64_t timestamp)
|
|||
dt_24h = static_cast<int64_t>(head.m_timestamp - tail_24h.m_timestamp);
|
||||
|
||||
average_effort = 0.0;
|
||||
diff = m_cumulativeFoundSharesDiff;
|
||||
const double diff = m_cumulativeFoundSharesDiff;
|
||||
if (diff > 0.0) {
|
||||
average_effort = static_cast<double>(m_cumulativeHashesAtLastShare) * 100.0 / diff;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue