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

View File

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

View File

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