aboutsummaryrefslogtreecommitdiff
path: root/src/addrman.cpp
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2012-04-15 16:52:09 -0400
committerLuke Dashjr <luke-jr+git@utopios.org>2012-04-17 14:59:32 -0400
commit0c3aa881e2ac7a6142fcfcbb9b7d2824532fe522 (patch)
treec3205a1993fa5e2bc5c2b82e692cb36c8bc84d71 /src/addrman.cpp
parent3374c3ef094b328e6c6957fdaf5a9abff0c53a33 (diff)
downloadbitcoin-0c3aa881e2ac7a6142fcfcbb9b7d2824532fe522.tar.xz
Fix loop index var types, fixing many minor sign comparison warnings
foo.size() typically returns an unsigned integral type; make loop variables match those types' signedness.
Diffstat (limited to 'src/addrman.cpp')
-rw-r--r--src/addrman.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/addrman.cpp b/src/addrman.cpp
index 8fb40b46df..11dd2a7b7d 100644
--- a/src/addrman.cpp
+++ b/src/addrman.cpp
@@ -124,7 +124,7 @@ int CAddrMan::SelectTried(int nKBucket)
// random shuffle the first few elements (using the entire list)
// find the least recently tried among them
int64 nOldest = -1;
- for (int i=0; i<ADDRMAN_TRIED_ENTRIES_INSPECT_ON_EVICT && i<vTried.size(); i++)
+ for (unsigned int i = 0; i < ADDRMAN_TRIED_ENTRIES_INSPECT_ON_EVICT && i < vTried.size(); i++)
{
int nPos = GetRandInt(vTried.size() - i) + i;
int nTemp = vTried[nPos];
@@ -270,7 +270,7 @@ void CAddrMan::Good_(const CService &addr, int64 nTime)
// find a bucket it is in now
int nRnd = GetRandInt(vvNew.size());
int nUBucket = -1;
- for (int n = 0; n < vvNew.size(); n++)
+ for (unsigned int n = 0; n < vvNew.size(); n++)
{
int nB = (n+nRnd) % vvNew.size();
std::set<int> &vNew = vvNew[nB];