[PATCH 8/8] qemu: Copy bitmap in a sane way

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use virBitmapNewCopy instead of a combination of virBitmapNew and
virBitmapCopy.
---
 src/qemu/qemu_driver.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 58fa3c6..71bbf6e 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -4752,12 +4752,10 @@ static int qemuDomainHotplugVcpus(virQEMUDriverPtr driver,
                 if (VIR_ALLOC(vcpupin) < 0)
                     goto cleanup;

-                if (!(vcpupin->cpumask =
-                      virBitmapNew(VIR_DOMAIN_CPUMASK_LEN))) {
+                if (!(vcpupin->cpumask = virBitmapNewCopy(vm->def->cpumask))) {
                     VIR_FREE(vcpupin);
                     goto cleanup;
                 }
-                virBitmapCopy(vcpupin->cpumask, vm->def->cpumask);
                 vcpupin->id = i;
                 if (VIR_APPEND_ELEMENT_COPY(vm->def->cputune.vcpupin,
                                             vm->def->cputune.nvcpupin, vcpupin) < 0) {
-- 
2.2.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]