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:
csoler 2009-03-09 12:09:11 +00:00
parent 307e58a5c1
commit 532148c433

View File

@ -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";