提交 fd754cb6 编写于 作者: J Jiri Denemark

qemu: Avoid comparing size_t with -1

ncpus would be -1 on error and the cleanup for loop would not be skipped
in this case.
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
上级 3446750b
......@@ -2965,7 +2965,7 @@ virQEMUCapsFetchCPUDefinitions(qemuMonitorPtr mon)
size_t i;
if ((ncpus = qemuMonitorGetCPUDefinitions(mon, &cpus)) < 0)
goto error;
return NULL;
if (!(models = virDomainCapsCPUModelsNew(ncpus)))
goto error;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册