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: Simon Goldschmidt
Subject: Re: [lwip-devel] Port on 16 bits processor: problem in ip4_addr_netmask_valid() function
Date: Thu, 17 Feb 2011 13:58:29 +0100

"Giuseppe Modugno" <address@hidden> wrote:
> 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?

I guess it should rather be '1UL' instead of '(u32_t)1U' (which should also 
work...). Does 1UL yield to a 32-bit constant for your controller?

BTW: This should be fixed for the 1.4.0 release, since it's really a small fix.

Also, please let us know if you run into any other problems regarding the 
16-bit processor, as there haven't been many people active on the lists using 
16-bit processors lately.

Simon
-- 
GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit 
gratis Handy-Flat! http://portal.gmx.net/de/go/dsl



reply via email to

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