[Top][All Lists]

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

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

From: Giuseppe Modugno
Subject: [lwip-devel] Port on 16 bits processor: problem in ip4_addr_netmask_valid() function
Date: Thu, 17 Feb 2011 12:05:11 +0100

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?

reply via email to

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