aboutsummaryrefslogtreecommitdiff
path: root/src/protocol.cpp
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2011-12-19 17:08:25 -0500
committerLuke Dashjr <luke-jr+git@utopios.org>2012-06-14 20:38:25 +0000
commit0ce74bfaa5f34351e5b23e19ee90e7367bd50245 (patch)
treea4445dd77cc0964fca7aa1514aaf324f278350fb /src/protocol.cpp
parent3703150d56ff6ee557ab330e55637c9c23835902 (diff)
downloadbitcoin-0ce74bfaa5f34351e5b23e19ee90e7367bd50245.tar.xz
Use std::numeric_limits<> for typesafe INT_MAX/etc
(this fixes a Mac OS X gitian build error for 0.5.x)
Diffstat (limited to 'src/protocol.cpp')
-rw-r--r--src/protocol.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/protocol.cpp b/src/protocol.cpp
index 3376c37e7b..410d0004bb 100644
--- a/src/protocol.cpp
+++ b/src/protocol.cpp
@@ -224,7 +224,7 @@ bool CAddress::IsValid() const
if (memcmp(pchReserved, pchIPv4+3, sizeof(pchIPv4)-3) == 0)
return false;
- return (ip != 0 && ip != INADDR_NONE && port != htons(USHRT_MAX));
+ return (ip != 0 && ip != INADDR_NONE && port != htons(std::numeric_limits<unsigned short>::max()));
}
unsigned char CAddress::GetByte(int n) const