lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] Possibly falsely triggered LWIP_ASSERT?


From: Mike Kleshov
Subject: Re: [lwip-devel] Possibly falsely triggered LWIP_ASSERT?
Date: Wed, 30 Sep 2009 13:42:27 +0400

2009/9/29 Bill Auerbach <address@hidden>:
> Because tot_len and grow (via casting) are u16_t, there is no problem here -
> no sign extension can occur.  If tot_len were larger, this would be a bug.
> In order to be "righter" this should be a cast to s_16t.  The compiler
> output will be unchanged by this change.
>
> Bill

This is true for two's-complement systems. There may exist systems
with different signed integer encodings, and the C programming
language standard supports them. On those systems, lwip would probably
brake in many other unexpected ways.
I don't think non-two's-complement systems of any practical
significance exist, so this is all purely theoretical...

- mike




reply via email to

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