From 5eed35ef542938a7ec493573ed955390e44c14e9 Mon Sep 17 00:00:00 2001 From: glx Date: Sat, 4 Apr 2009 03:45:02 +0000 Subject: (svn r15950) -Fix (r15946): mingw compilation --- src/network/core/address.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/network/core/address.cpp b/src/network/core/address.cpp index a8ba5c076..56c49a83f 100644 --- a/src/network/core/address.cpp +++ b/src/network/core/address.cpp @@ -120,13 +120,13 @@ bool NetworkAddress::IsInNetmask(char *netmask) uint32 *mask; switch (this->address.ss_family) { case AF_INET: - ip = &((struct sockaddr_in*)&this->address)->sin_addr.s_addr; - mask = &((struct sockaddr_in*)&mask_address.address)->sin_addr.s_addr; + ip = (uint32*)&((struct sockaddr_in*)&this->address)->sin_addr.s_addr; + mask = (uint32*)&((struct sockaddr_in*)&mask_address.address)->sin_addr.s_addr; break; case AF_INET6: - ip = ((struct sockaddr_in6*)&this->address)->sin6_addr.s6_addr32; - mask = ((struct sockaddr_in6*)&mask_address.address)->sin6_addr.s6_addr32; + ip = (uint32*)((struct sockaddr_in6*)&this->address)->sin6_addr.s6_addr32; + mask = (uint32*)((struct sockaddr_in6*)&mask_address.address)->sin6_addr.s6_addr32; break; default: @@ -134,7 +134,7 @@ bool NetworkAddress::IsInNetmask(char *netmask) } while (cidr > 0) { - uint32 msk = cidr >= 32 ? -1 : htonl(-(1 << (32 - cidr))); + uint32 msk = cidr >= 32 ? (uint32)-1 : htonl(-(1 << (32 - cidr))); if ((*mask & msk) != (*ip & msk)) return false; cidr -= 32; -- cgit v1.2.3-70-g09d2