mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-12 16:17:53 +00:00
fix two signed/unsigned comparison warnings in netbase.cpp
This commit is contained in:
parent
46e06b875d
commit
b69dd08ae7
@ -1010,7 +1010,7 @@ bool operator<(const CService& a, const CService& b)
|
|||||||
bool CService::GetSockAddr(struct sockaddr* paddr, socklen_t *addrlen) const
|
bool CService::GetSockAddr(struct sockaddr* paddr, socklen_t *addrlen) const
|
||||||
{
|
{
|
||||||
if (IsIPv4()) {
|
if (IsIPv4()) {
|
||||||
if (*addrlen < sizeof(struct sockaddr_in))
|
if (*addrlen < (socklen_t)sizeof(struct sockaddr_in))
|
||||||
return false;
|
return false;
|
||||||
*addrlen = sizeof(struct sockaddr_in);
|
*addrlen = sizeof(struct sockaddr_in);
|
||||||
struct sockaddr_in *paddrin = (struct sockaddr_in*)paddr;
|
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
|
#ifdef USE_IPV6
|
||||||
if (IsIPv6()) {
|
if (IsIPv6()) {
|
||||||
if (*addrlen < sizeof(struct sockaddr_in6))
|
if (*addrlen < (socklen_t)sizeof(struct sockaddr_in6))
|
||||||
return false;
|
return false;
|
||||||
*addrlen = sizeof(struct sockaddr_in6);
|
*addrlen = sizeof(struct sockaddr_in6);
|
||||||
struct sockaddr_in6 *paddrin6 = (struct sockaddr_in6*)paddr;
|
struct sockaddr_in6 *paddrin6 = (struct sockaddr_in6*)paddr;
|
||||||
|
Loading…
Reference in New Issue
Block a user