introducing designated initializers for structures

Rich Felker dalias at aerifal.cx
Sat May 20 19:42:46 UTC 2006


On Sat, May 20, 2006 at 07:29:32AM -0400, Robert P. J. Day wrote:
> 
>   attached is an example of a change i'd like to start making, just so
> it's more obvious what's being initialized in a structure.
> 
>   i forget the initialization rule, though -- what happens with
> members of statically-allocated structures in terms of their initial
> values?  will they be NULL or 0?  or should every member field be
> explicitly initialized?

They will of course be zero. Also for automatic structures, if any
members are initialized then all other members not explicitly
initialized will be initialized to zero, if I'm not mistaken.

Rich




More information about the busybox mailing list