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