[PATCH 3/3] qemu: driver: Remove unnecessary condition

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

 



At this point it's guaranteed that 'persistentDef' is non-NULL so we
don't need to check it again.
---
 src/qemu/qemu_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 07d33d3..d044a8c 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -4730,7 +4730,7 @@ qemuDomainSetVcpusMax(virQEMUDriverPtr driver,
         goto cleanup;
     }

-    if (persistentDef && persistentDef->cpu && persistentDef->cpu->sockets) {
+    if (persistentDef->cpu && persistentDef->cpu->sockets) {
         /* allow setting a valid vcpu count for the topology so an invalid
          * setting may be corrected via this API */
         if (nvcpus != persistentDef->cpu->sockets *
-- 
2.10.0

--
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]