The function always returns 0.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_capabilities.c | 11 ++++-------
src/qemu/qemu_capabilities.h | 8 ++++----
tests/qemucaps2xmltest.c | 8 +-------
3 files changed, 9 insertions(+), 18 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 135455df63..72105a65a3 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -1004,9 +1004,8 @@ virQEMUCapsInitGuest(virCaps *caps,
}
}
- ret = virQEMUCapsInitGuestFromBinary(caps,
- binary, qemuCaps,
- guestarch);
+ virQEMUCapsInitGuestFromBinary(caps, binary, qemuCaps, guestarch);
+ ret = 0;
VIR_FREE(binary);
virObjectUnref(qemuCaps);
@@ -1096,7 +1095,7 @@ virQEMUCapsGetMachineTypesCaps(virQEMUCaps *qemuCaps,
}
-int
+void
virQEMUCapsInitGuestFromBinary(virCaps *caps,
const char *binary,
virQEMUCaps *qemuCaps,
@@ -1107,7 +1106,7 @@ virQEMUCapsInitGuestFromBinary(virCaps *caps,
size_t nmachines = 0;
if (!binary)
- return 0;
+ return;
virQEMUCapsGetMachineTypesCaps(qemuCaps, &nmachines, &machines);
@@ -1150,8 +1149,6 @@ virQEMUCapsInitGuestFromBinary(virCaps *caps,
virCapabilitiesAddGuestFeature(guest, VIR_CAPS_GUEST_FEATURE_TYPE_PAE);
virCapabilitiesAddGuestFeature(guest, VIR_CAPS_GUEST_FEATURE_TYPE_NONPAE);
}
-
- return 0;
}
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 4881f41253..ca31e26f0d 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -819,10 +819,10 @@ bool virQEMUCapsSupportsGICVersion(virQEMUCaps *qemuCaps,
const char *virQEMUCapsGetPreferredMachine(virQEMUCaps *qemuCaps,
virDomainVirtType virtType);
-int virQEMUCapsInitGuestFromBinary(virCaps *caps,
- const char *binary,
- virQEMUCaps *qemuCaps,
- virArch guestarch);
+void virQEMUCapsInitGuestFromBinary(virCaps *caps,
+ const char *binary,
+ virQEMUCaps *qemuCaps,
+ virArch guestarch);
int virQEMUCapsFillDomainCaps(virQEMUCaps *qemuCaps,
virArch hostarch,
diff --git a/tests/qemucaps2xmltest.c b/tests/qemucaps2xmltest.c
index 2c5cb1b68b..192fb48450 100644
--- a/tests/qemucaps2xmltest.c
+++ b/tests/qemucaps2xmltest.c
@@ -102,13 +102,7 @@ testGetCaps(char *capsData, const testQemuData *data)
return NULL;
}
- if (virQEMUCapsInitGuestFromBinary(caps,
- binary,
- qemuCaps,
- arch) < 0) {
- fprintf(stderr, "failed to create the capabilities from qemu");
- return NULL;
- }
+ virQEMUCapsInitGuestFromBinary(caps, binary, qemuCaps, arch);
return g_steal_pointer(&caps);
}
--
2.39.2