}
-static int
+static void
virQEMUCapsGetMachineTypesCaps(virQEMUCaps *qemuCaps,
size_t *nmachines,
virCapsGuestMachine ***machines)
*nmachines = accel->nmachineTypes;
if (*nmachines == 0)
- return 0;
+ return;
array = g_ptr_array_sized_new(*nmachines);
*machines = g_new0(virCapsGuestMachine *, array->len);
for (i = 0; i < array->len; ++i)
(*machines)[i] = g_ptr_array_index(array, i);
-
- return 0;
}
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 */
ret = 0;
- cleanup:
-
virCapabilitiesFreeMachines(machines, nmachines);
return ret;