Fixed constant not being 32 bit.

This commit is contained in:
goldsimon 2011-02-17 17:03:12 +00:00
parent fb7d3a159a
commit fee0c6afe9
2 changed files with 4 additions and 1 deletions

View File

@ -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

View File

@ -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;
}