diff options
author | Jeff Garzik <jeff@garzik.org> | 2012-04-15 16:52:09 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2012-04-15 16:52:09 -0400 |
commit | c376ac359ec8551823b4ee14c85d85a49f2d3436 (patch) | |
tree | 121093f97279ca969a424f3792e64c41f8a05b48 /src/addrman.cpp | |
parent | ab9dc75a183c7a46e38e957ee3192d5febcccb3c (diff) |
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.cpp | 4 |
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]; |