lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-devel] Port on 16 bits processor: problem in ip4_addr_netmask_


From: address@hidden
Subject: Re: [lwip-devel] Port on 16 bits processor: problem in ip4_addr_netmask_valid() function
Date: Thu, 17 Feb 2011 18:03:46 +0100
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7

Giuseppe,
this is fixed in CVS HEAD by using '1UL' instead of '1U'. Thanks for reporting.

Simon


Giuseppe Modugno wrote:
Dear all,

I'm new with lwip. I started including lwip-1.4.0.rc2 in one of my project for a 16 bits microcontroller (Fujitsu 16LX series).

I think I have found a problem in ip4_addr_netmask_valid() function in ip_addr.c module. Take a look at the following instruction:
  for (mask = 1U << 31 ; mask != 0; mask >>= 1) {

The operation 1U << 31 can't be well performed on a 16 bits processor. It should be (u32_t)1U << 31. What do you think?
 
_______________________________________________ lwip-devel mailing list address@hidden http://lists.nongnu.org/mailman/listinfo/lwip-devel


reply via email to

[Prev in Thread] Current Thread [Next in Thread]