mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-06 17:17:56 +03:00
qemu: Drop ret variable from qemuConnectCPUModelComparison
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
449f8b4848
commit
6f59749e4e
@ -13150,7 +13150,6 @@ qemuConnectCPUModelComparison(virQEMUCapsPtr qemuCaps,
|
||||
{
|
||||
g_autoptr(qemuProcessQMP) proc = NULL;
|
||||
g_autofree char *result = NULL;
|
||||
int ret = VIR_CPU_COMPARE_ERROR;
|
||||
|
||||
if (!(proc = qemuProcessQMPNew(virQEMUCapsGetBinary(qemuCaps),
|
||||
libDir, runUid, runGid, false)))
|
||||
@ -13163,15 +13162,17 @@ qemuConnectCPUModelComparison(virQEMUCapsPtr qemuCaps,
|
||||
return VIR_CPU_COMPARE_ERROR;
|
||||
|
||||
if (STREQ(result, "identical"))
|
||||
ret = VIR_CPU_COMPARE_IDENTICAL;
|
||||
else if (STREQ(result, "superset"))
|
||||
ret = VIR_CPU_COMPARE_SUPERSET;
|
||||
else if (failIncompatible)
|
||||
virReportError(VIR_ERR_CPU_INCOMPATIBLE, NULL);
|
||||
else
|
||||
ret = VIR_CPU_COMPARE_INCOMPATIBLE;
|
||||
return VIR_CPU_COMPARE_IDENTICAL;
|
||||
|
||||
return ret;
|
||||
if (STREQ(result, "superset"))
|
||||
return VIR_CPU_COMPARE_SUPERSET;
|
||||
|
||||
if (failIncompatible) {
|
||||
virReportError(VIR_ERR_CPU_INCOMPATIBLE, NULL);
|
||||
return VIR_CPU_COMPARE_ERROR;
|
||||
}
|
||||
|
||||
return VIR_CPU_COMPARE_INCOMPATIBLE;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user