cosmetic fix

This commit is contained in:
Jeff Becker 2016-09-01 15:54:48 -04:00
parent c9c58074fa
commit 3ea624e1db
No known key found for this signature in database
GPG Key ID: AB950234D6EA286B

View File

@ -350,7 +350,7 @@ namespace data
std::vector<std::shared_ptr<const RouterInfo> > found;
const size_t max_iters_per_cyle = 3;
size_t iters = max_iters_per_cyle;
while(n)
while(n > 0)
{
std::unique_lock<std::mutex> lock(m_RouterInfosMutex);
uint32_t idx = rand () % m_RouterInfos.size ();
@ -372,6 +372,8 @@ namespace data
else // not there yet
++i;
}
// we have enough
if(n == 0) break;
--iters;
// have we tried enough this cycle ?
if(!iters) {