diff options
author | Philip Kaufmann <phil.kaufmann@t-online.de> | 2012-06-05 07:32:27 +0200 |
---|---|---|
committer | Philip Kaufmann <phil.kaufmann@t-online.de> | 2012-06-05 07:32:27 +0200 |
commit | b69dd08ae76c5503e5eaa419b03414ab5e7b9ccd (patch) | |
tree | 7eaaf970833d97c7fd985caf6600002a7cfc98ba | |
parent | 46e06b875d861661c4a3002e8ae3d080b5893053 (diff) | |
download | bitcoin-b69dd08ae76c5503e5eaa419b03414ab5e7b9ccd.tar.xz |
fix two signed/unsigned comparison warnings in netbase.cpp
-rw-r--r-- | src/netbase.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/netbase.cpp b/src/netbase.cpp index 80b0e32c39..d1ead79ebb 100644 --- a/src/netbase.cpp +++ b/src/netbase.cpp @@ -1010,7 +1010,7 @@ bool operator<(const CService& a, const CService& b) bool CService::GetSockAddr(struct sockaddr* paddr, socklen_t *addrlen) const { if (IsIPv4()) { - if (*addrlen < sizeof(struct sockaddr_in)) + if (*addrlen < (socklen_t)sizeof(struct sockaddr_in)) return false; *addrlen = sizeof(struct sockaddr_in); struct sockaddr_in *paddrin = (struct sockaddr_in*)paddr; @@ -1023,7 +1023,7 @@ bool CService::GetSockAddr(struct sockaddr* paddr, socklen_t *addrlen) const } #ifdef USE_IPV6 if (IsIPv6()) { - if (*addrlen < sizeof(struct sockaddr_in6)) + if (*addrlen < (socklen_t)sizeof(struct sockaddr_in6)) return false; *addrlen = sizeof(struct sockaddr_in6); struct sockaddr_in6 *paddrin6 = (struct sockaddr_in6*)paddr; |