virQEMUCapsInitGuestFromBinary: Remove return value

The function always returns 0.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2023-03-17 14:36:54 +01:00
parent 6481b06a19
commit a4c03bdd59
3 changed files with 9 additions and 18 deletions

View File

@ -1004,9 +1004,8 @@ virQEMUCapsInitGuest(virCaps *caps,
} }
} }
ret = virQEMUCapsInitGuestFromBinary(caps, virQEMUCapsInitGuestFromBinary(caps, binary, qemuCaps, guestarch);
binary, qemuCaps, ret = 0;
guestarch);
VIR_FREE(binary); VIR_FREE(binary);
virObjectUnref(qemuCaps); virObjectUnref(qemuCaps);
@ -1096,7 +1095,7 @@ virQEMUCapsGetMachineTypesCaps(virQEMUCaps *qemuCaps,
} }
int void
virQEMUCapsInitGuestFromBinary(virCaps *caps, virQEMUCapsInitGuestFromBinary(virCaps *caps,
const char *binary, const char *binary,
virQEMUCaps *qemuCaps, virQEMUCaps *qemuCaps,
@ -1107,7 +1106,7 @@ virQEMUCapsInitGuestFromBinary(virCaps *caps,
size_t nmachines = 0; size_t nmachines = 0;
if (!binary) if (!binary)
return 0; return;
virQEMUCapsGetMachineTypesCaps(qemuCaps, &nmachines, &machines); 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_PAE);
virCapabilitiesAddGuestFeature(guest, VIR_CAPS_GUEST_FEATURE_TYPE_NONPAE); virCapabilitiesAddGuestFeature(guest, VIR_CAPS_GUEST_FEATURE_TYPE_NONPAE);
} }
return 0;
} }

View File

@ -819,10 +819,10 @@ bool virQEMUCapsSupportsGICVersion(virQEMUCaps *qemuCaps,
const char *virQEMUCapsGetPreferredMachine(virQEMUCaps *qemuCaps, const char *virQEMUCapsGetPreferredMachine(virQEMUCaps *qemuCaps,
virDomainVirtType virtType); virDomainVirtType virtType);
int virQEMUCapsInitGuestFromBinary(virCaps *caps, void virQEMUCapsInitGuestFromBinary(virCaps *caps,
const char *binary, const char *binary,
virQEMUCaps *qemuCaps, virQEMUCaps *qemuCaps,
virArch guestarch); virArch guestarch);
int virQEMUCapsFillDomainCaps(virQEMUCaps *qemuCaps, int virQEMUCapsFillDomainCaps(virQEMUCaps *qemuCaps,
virArch hostarch, virArch hostarch,

View File

@ -102,13 +102,7 @@ testGetCaps(char *capsData, const testQemuData *data)
return NULL; return NULL;
} }
if (virQEMUCapsInitGuestFromBinary(caps, virQEMUCapsInitGuestFromBinary(caps, binary, qemuCaps, arch);
binary,
qemuCaps,
arch) < 0) {
fprintf(stderr, "failed to create the capabilities from qemu");
return NULL;
}
return g_steal_pointer(&caps); return g_steal_pointer(&caps);
} }