lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] next_timeout not working correctly


From: Simon Goldschmidt
Subject: Re: [lwip-devel] next_timeout not working correctly
Date: Sat, 1 Nov 2014 08:44:48 +0100

Carlos Galindo wrote:
> My proposal to prevent that is changing the variable declaration from:
> 
> static struct sys_timeo *next_timeout;
> 
> to:
> 
> static struct sys_timeo *next_timeout = NULL;
> 
> Does it makes sense to you?

No. There is a good reason the "= NULL" part has been removed. When added, the 
variable takes space in the binary (flash). And for a correctly initialized, 
non-buggy system, the explicit initialization is not needed anyway, as the C 
standard guarantees to zero these variables on startup. So you see the result 
of a bug in your system startup, not in lwIP.

Simon



reply via email to

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