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