aboutsummaryrefslogtreecommitdiff
path: root/src/addrman.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/addrman.cpp')
-rw-r--r--src/addrman.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/addrman.cpp b/src/addrman.cpp
index 10d005aae9..56ac9ca12c 100644
--- a/src/addrman.cpp
+++ b/src/addrman.cpp
@@ -102,12 +102,11 @@ CAddrInfo* CAddrMan::Create(const CAddress &addr, const CNetAddr &addrSource, in
return &mapInfo[nId];
}
-void CAddrMan::SwapRandom(int nRndPos1, int nRndPos2)
+void CAddrMan::SwapRandom(unsigned int nRndPos1, unsigned int nRndPos2)
{
if (nRndPos1 == nRndPos2)
return;
- assert(nRndPos1 >= 0 && nRndPos2 >= 0);
assert(nRndPos1 < vRandom.size() && nRndPos2 < vRandom.size());
int nId1 = vRandom[nRndPos1];
@@ -149,7 +148,7 @@ int CAddrMan::SelectTried(int nKBucket)
int CAddrMan::ShrinkNew(int nUBucket)
{
- assert(nUBucket >= 0 && nUBucket < vvNew.size());
+ assert(nUBucket >= 0 && (unsigned int)nUBucket < vvNew.size());
std::set<int> &vNew = vvNew[nUBucket];
// first look for deletable items