mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-26 12:21:19 +00:00
gcc-6: error: left shift of negative value [-Werror=shift-negative-value]
This commit is contained in:
parent
35b254feaa
commit
4956be2bd4
1 changed files with 1 additions and 1 deletions
|
@ -466,7 +466,7 @@ static boolean SOCK_cmpaddr(mysockaddr_t *a, mysockaddr_t *b, UINT8 mask)
|
|||
UINT32 bitmask = INADDR_NONE;
|
||||
|
||||
if (mask && mask < 32)
|
||||
bitmask = htonl(-1 << (32 - mask));
|
||||
bitmask = htonl((UINT32)(-1) << (32 - mask));
|
||||
|
||||
if (b->any.sa_family == AF_INET)
|
||||
return (a->ip4.sin_addr.s_addr & bitmask) == (b->ip4.sin_addr.s_addr & bitmask)
|
||||
|
|
Loading…
Reference in a new issue