Re: [PATCH 11/13] lib: use struct zero initializer instead of memset

2023-08-03 Thread Claudio Fontana
On 8/3/23 12:36, Michal Privoznik wrote: > This is a more concise approach and guarantees there is > no time window where the struct is uninitialized. > > Generated using the following semantic patch: > > @@ > type T; > identifier X; > @@ > - T X; > + T X = { 0 }; > ... when

[PATCH 11/13] lib: use struct zero initializer instead of memset

2023-08-03 Thread Michal Privoznik
This is a more concise approach and guarantees there is no time window where the struct is uninitialized. Generated using the following semantic patch: @@ type T; identifier X; @@ - T X; + T X = { 0 }; ... when exists ( - memset(, 0, sizeof(X)); | - memset(, 0,