From: Peter Krempa Date: Wed, 7 Sep 2016 11:59:25 +0000 (+0200) Subject: qemu: driver: Remove unnecessary condition X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=b871b78986760890d6d8d96e9380fd2687208fa5;p=libvirt.git qemu: driver: Remove unnecessary condition At this point it's guaranteed that 'persistentDef' is non-NULL so we don't need to check it again. --- diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 07d33d3c7e..d044a8c822 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 *