Skip to content
Snippets Groups Projects
Commit 4956be2b authored by Alam Ed Arias's avatar Alam Ed Arias
Browse files

gcc-6: error: left shift of negative value [-Werror=shift-negative-value]

parent 35b254fe
Branches
Tags
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment