Browse Source

Fixed constant not being 32 bit.

STABLE-2_1_x
goldsimon 15 years ago
parent
commit
fee0c6afe9
  1. 3
      CHANGELOG
  2. 2
      src/core/ipv4/ip_addr.c

3
CHANGELOG

@ -233,6 +233,9 @@ HISTORY
++ Bugfixes:
2011-02-17: Simon Goldschmidt
* ipaddr.c: Fixed constant not being 32 bit.
2011-01-24: Simon Goldschmidt
* sockets.c: Fixed bug #31741: lwip_select seems to have threading problems

2
src/core/ipv4/ip_addr.c

@ -93,7 +93,7 @@ ip4_addr_netmask_valid(u32_t netmask)
u32_t nm_hostorder = lwip_htonl(netmask);
/* first, check for the first zero */
for (mask = 1U << 31 ; mask != 0; mask >>= 1) {
for (mask = 1UL << 31 ; mask != 0; mask >>= 1) {
if ((nm_hostorder & mask) == 0) {
break;
}

Loading…
Cancel
Save