On 11/15/19 6:29 PM, Alex Bennée wrote:
>  
>  static GDBState *gdbserver_state;
>  
> +static GDBState *gdb_allocate_state(void)
> +{
> +    g_assert(!gdbserver_state);
> +    gdbserver_state = g_new0(GDBState, 1);
> +    return gdbserver_state;
> +}
> +
Actually, if we're only going to have one, why are we allocating it
dynamically?  We might as well allocate it statically and drop the pointer
indirection.


r~

Reply via email to