mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-09 08:43:04 +01:00
Use std::numeric_limits<> for typesafe INT_MAX/etc
(this fixes a Mac OS X gitian build error for 0.5.x)
This commit is contained in:
committed by
Luke Dashjr
parent
3703150d56
commit
0ce74bfaa5
@@ -251,8 +251,8 @@ bool Lookup(const char *pszName, vector<CAddress>& vaddr, int nServices, int nMa
|
||||
else
|
||||
pszColon[0] = 0;
|
||||
port = portParsed;
|
||||
if (port < 0 || port > USHRT_MAX)
|
||||
port = USHRT_MAX;
|
||||
if (port < 0 || port > std::numeric_limits<unsigned short>::max())
|
||||
port = std::numeric_limits<unsigned short>::max();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1540,7 +1540,7 @@ void ThreadOpenConnections2(void* parg)
|
||||
// Choose an address to connect to based on most recently seen
|
||||
//
|
||||
CAddress addrConnect;
|
||||
int64 nBest = INT64_MIN;
|
||||
int64 nBest = std::numeric_limits<int64>::min();
|
||||
|
||||
// Only connect to one address per a.b.?.? range.
|
||||
// Do this here so we don't have to critsect vNodes inside mapAddresses critsect.
|
||||
|
||||
Reference in New Issue
Block a user