4 ms·
Unclear to me why you've been downvoted; I've seen many cases where a structure has had elements added which would be end up uninitialised. A memset(&struct,0,s
by hazeii 7y ago
Unclear to me why you've been downvoted; I've seen many cases where a structure has had elements added which would be end up uninitialised. A memset(&struct,0,sizeof(struct)) seems pretty reasonable to me.
- NikkiA 7y agoProbably because the article specifically addresses this issue and C99 specifically initializes any members who are not named in the initializer form to either zero or NULL.