1
0
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:
Jiri Denemark 2020-07-21 15:47:29 +02:00
parent 449f8b4848
commit 6f59749e4e

View File

@ -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;
}