1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-07 17:28:15 +00:00

qemu: Remove unnecessary variables

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
Andrea Bolognani 2018-09-18 17:06:48 +02:00
parent 943f2d53c6
commit 9f01f9b4e4

View File

@ -804,7 +804,6 @@ virQEMUCapsInitGuestFromBinary(virCapsPtr caps,
virArch guestarch) virArch guestarch)
{ {
virCapsGuestPtr guest; virCapsGuestPtr guest;
bool haskvm = false;
virCapsGuestMachinePtr *machines = NULL; virCapsGuestMachinePtr *machines = NULL;
size_t nmachines = 0; size_t nmachines = 0;
int ret = -1; int ret = -1;
@ -813,9 +812,6 @@ virQEMUCapsInitGuestFromBinary(virCapsPtr caps,
if (!binary) if (!binary)
return 0; return 0;
if (virQEMUCapsGet(qemubinCaps, QEMU_CAPS_KVM))
haskvm = true;
if (virQEMUCapsGetMachineTypesCaps(qemubinCaps, &nmachines, &machines) < 0) if (virQEMUCapsGetMachineTypesCaps(qemubinCaps, &nmachines, &machines) < 0)
goto cleanup; goto cleanup;
@ -856,15 +852,13 @@ virQEMUCapsInitGuestFromBinary(virCapsPtr caps,
NULL) == NULL) NULL) == NULL)
goto cleanup; goto cleanup;
if (haskvm) { if (virQEMUCapsGet(qemubinCaps, QEMU_CAPS_KVM)) {
virCapsGuestDomainPtr dom; if (virCapabilitiesAddGuestDomain(guest,
VIR_DOMAIN_VIRT_KVM,
if ((dom = virCapabilitiesAddGuestDomain(guest, NULL,
VIR_DOMAIN_VIRT_KVM, NULL,
NULL, 0,
NULL, NULL) == NULL) {
0,
NULL)) == NULL) {
goto cleanup; goto cleanup;
} }
} }