mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
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.
This commit is contained in:
@@ -624,7 +624,7 @@ void ThreadSocketHandler2(void* parg)
|
||||
if (hSocketMax > -1)
|
||||
{
|
||||
printf("socket select error %d\n", nErr);
|
||||
for (int i = 0; i <= hSocketMax; i++)
|
||||
for (unsigned int i = 0; i <= hSocketMax; i++)
|
||||
FD_SET(i, &fdsetRecv);
|
||||
}
|
||||
FD_ZERO(&fdsetSend);
|
||||
@@ -1024,7 +1024,7 @@ void ThreadDNSAddressSeed2(void* parg)
|
||||
{
|
||||
printf("Loading addresses from DNS seeds (could take a while)\n");
|
||||
|
||||
for (int seed_idx = 0; seed_idx < ARRAYLEN(strDNSSeed); seed_idx++) {
|
||||
for (unsigned int seed_idx = 0; seed_idx < ARRAYLEN(strDNSSeed); seed_idx++) {
|
||||
vector<CNetAddr> vaddr;
|
||||
vector<CAddress> vAdd;
|
||||
if (LookupHost(strDNSSeed[seed_idx][1], vaddr))
|
||||
@@ -1238,7 +1238,7 @@ void ThreadOpenConnections2(void* parg)
|
||||
if (addrman.size()==0 && (GetTime() - nStart > 60 || fTOR) && !fTestNet)
|
||||
{
|
||||
std::vector<CAddress> vAdd;
|
||||
for (int i = 0; i < ARRAYLEN(pnSeed); i++)
|
||||
for (unsigned int i = 0; i < ARRAYLEN(pnSeed); i++)
|
||||
{
|
||||
// It'll only connect to one or two seed nodes because once it connects,
|
||||
// it'll get a pile of addresses with newer timestamps.
|
||||
|
||||
Reference in New Issue
Block a user