mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-14 00:49:41 -05:00
suppressed uninitialized memory read
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1065 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
307e58a5c1
commit
532148c433
@ -68,8 +68,7 @@ pthread_t createThread(RsThread &thread)
|
|||||||
RsQueueThread::RsQueueThread(uint32_t min, uint32_t max, double relaxFactor )
|
RsQueueThread::RsQueueThread(uint32_t min, uint32_t max, double relaxFactor )
|
||||||
:mMinSleep(min), mMaxSleep(max), mRelaxFactor(relaxFactor)
|
:mMinSleep(min), mMaxSleep(max), mRelaxFactor(relaxFactor)
|
||||||
{
|
{
|
||||||
|
mLastSleep = (uint32_t)mMinSleep ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RsQueueThread::run()
|
void RsQueueThread::run()
|
||||||
@ -85,8 +84,7 @@ void RsQueueThread::run()
|
|||||||
if (doneWork)
|
if (doneWork)
|
||||||
{
|
{
|
||||||
mLastWork = now;
|
mLastWork = now;
|
||||||
mLastSleep = (uint32_t)
|
mLastSleep = (uint32_t) (mMinSleep + (mLastSleep - mMinSleep) / 2.0);
|
||||||
(mMinSleep + (mLastSleep - mMinSleep) / 2.0);
|
|
||||||
#ifdef DEBUG_THREADS
|
#ifdef DEBUG_THREADS
|
||||||
std::cerr << "RsQueueThread::run() done work: sleeping for: " << mLastSleep;
|
std::cerr << "RsQueueThread::run() done work: sleeping for: " << mLastSleep;
|
||||||
std::cerr << " ms";
|
std::cerr << " ms";
|
||||||
|
Loading…
Reference in New Issue
Block a user