mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-12 15:52:55 +00:00
virQEMUCapsGetMachineTypesCaps: 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:
parent
ccee1ee088
commit
58e1b19aef
@ -1015,7 +1015,7 @@ virQEMUCapsInitGuest(virCaps *caps,
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
static void
|
||||
virQEMUCapsGetMachineTypesCaps(virQEMUCaps *qemuCaps,
|
||||
size_t *nmachines,
|
||||
virCapsGuestMachine ***machines)
|
||||
@ -1037,7 +1037,7 @@ virQEMUCapsGetMachineTypesCaps(virQEMUCaps *qemuCaps,
|
||||
*nmachines = accel->nmachineTypes;
|
||||
|
||||
if (*nmachines == 0)
|
||||
return 0;
|
||||
return;
|
||||
|
||||
array = g_ptr_array_sized_new(*nmachines);
|
||||
|
||||
@ -1093,8 +1093,6 @@ virQEMUCapsGetMachineTypesCaps(virQEMUCaps *qemuCaps,
|
||||
*machines = g_new0(virCapsGuestMachine *, array->len);
|
||||
for (i = 0; i < array->len; ++i)
|
||||
(*machines)[i] = g_ptr_array_index(array, i);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -1112,8 +1110,7 @@ virQEMUCapsInitGuestFromBinary(virCaps *caps,
|
||||
if (!binary)
|
||||
return 0;
|
||||
|
||||
if (virQEMUCapsGetMachineTypesCaps(qemuCaps, &nmachines, &machines) < 0)
|
||||
goto cleanup;
|
||||
virQEMUCapsGetMachineTypesCaps(qemuCaps, &nmachines, &machines);
|
||||
|
||||
/* We register kvm as the base emulator too, since we can
|
||||
* just give -no-kvm to disable acceleration if required */
|
||||
@ -1160,8 +1157,6 @@ virQEMUCapsInitGuestFromBinary(virCaps *caps,
|
||||
|
||||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
|
||||
virCapabilitiesFreeMachines(machines, nmachines);
|
||||
|
||||
return ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user