The function now always returns 0.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_capabilities.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 5341f5c1da..aba52cc10d 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -1959,7 +1959,7 @@ virQEMUCapsAccelCopyMachineTypes(virQEMUCapsAccel *dst,
}
-static int
+static void
virQEMUCapsAccelCopy(virQEMUCapsAccel *dst,
virQEMUCapsAccel *src)
{
@@ -1968,8 +1968,6 @@ virQEMUCapsAccelCopy(virQEMUCapsAccel *dst,
virQEMUCapsHostCPUDataCopy(&dst->hostCPU, &src->hostCPU);
dst->cpuModels = qemuMonitorCPUDefsCopy(src->cpuModels);
-
- return 0;
}
@@ -1998,10 +1996,9 @@ virQEMUCaps *virQEMUCapsNewCopy(virQEMUCaps *qemuCaps)
ret->arch = qemuCaps->arch;
ret->cpuData = virCPUDataNewCopy(qemuCaps->cpuData);
- if (virQEMUCapsAccelCopy(&ret->kvm, &qemuCaps->kvm) < 0 ||
- virQEMUCapsAccelCopy(&ret->hvf, &qemuCaps->hvf) < 0 ||
- virQEMUCapsAccelCopy(&ret->tcg, &qemuCaps->tcg) < 0)
- return NULL;
+ virQEMUCapsAccelCopy(&ret->kvm, &qemuCaps->kvm);
+ virQEMUCapsAccelCopy(&ret->hvf, &qemuCaps->hvf);
+ virQEMUCapsAccelCopy(&ret->tcg, &qemuCaps->tcg);
ret->gicCapabilities = g_new0(virGICCapability, qemuCaps->ngicCapabilities);
ret->ngicCapabilities = qemuCaps->ngicCapabilities;
--
2.39.2