On Mon, Oct 12, 2026 at 16:26:23 +0300, Elizaveta wrote:
> > Can you, please, describe how exactly can
> > qemuMonitorGetCPUModelExpansion return zero without assigning to
> > model_info?
> >
> > Looking at the code the only way the function could return zero is when
> > qemuMonitorJSONParseCPUModel returns zero. And that only happens in one
> > place:
> >
> >     *model_info = g_steal_pointer(&machine_model);
> >     return 0;
> 
> As I understand:
> 
> qemuMonitorGetCPUModelExpansion() returns
> qemuMonitorJSONGetCPUModelExpansion() result.
> 
> In qemuMonitorJSONGetCPUModelExpansion():
> 
> ```
> if ((rc = qemuMonitorJSONQueryCPUModelExpansionOne(mon, type, &model,
> &data)) <= 0)
> return rc;
> ```

Oh you are right, I missed that line somehow.

Jirka

Reply via email to