提交 9f01f9b4 编写于 作者: A Andrea Bolognani

qemu: Remove unnecessary variables

Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
上级 943f2d53
...@@ -804,7 +804,6 @@ virQEMUCapsInitGuestFromBinary(virCapsPtr caps, ...@@ -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, ...@@ -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, ...@@ -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;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册