mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
conf: Fix build with picky GCC
../../src/conf/domain_conf.c:4425:21: error: potential null pointer dereference [-Werror=null-dereference] switch (vcpu->hotpluggable) { ~~~~^~~~~~~~~~~~~~
This commit is contained in:
parent
802fac97ec
commit
9cf086be6d
@ -4422,6 +4422,10 @@ virDomainVcpuDefPostParse(virDomainDefPtr def)
|
||||
for (i = 0; i < maxvcpus; i++) {
|
||||
vcpu = virDomainDefGetVcpu(def, i);
|
||||
|
||||
/* impossible but some compilers don't like it */
|
||||
if (!vcpu)
|
||||
continue;
|
||||
|
||||
switch (vcpu->hotpluggable) {
|
||||
case VIR_TRISTATE_BOOL_ABSENT:
|
||||
if (vcpu->online)
|
||||
|
Loading…
x
Reference in New Issue
Block a user