On 11/30/19 8:45 AM, Alex Bennée wrote: > -static GDBState *gdbserver_state; > +static GDBState gdbserver_state; > + > +static void init_gdbserver_state(void) > +{ > + g_assert(!gdbserver_state.init); > + memset(&gdbserver_state, 0, sizeof(GDBState)); > + gdbserver_state.init = true; > +}
At no point does init transition from true to false, afaict. Therefore the memset is unnecessary, as the effect is had from the default zero-initialization of the static variable. Otherwise, Reviewed-by: Richard Henderson <richard.hender...@linaro.org> r~