mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 07:17:44 +00:00
qemu: Resolve Coverity UNINIT
For some reason, commit id '72b4151f' triggered a Coverity uninitialized 'reply' variable check when referenced within the for loop. It seems Coverity doesn't know that flags will have to be either AFFECT_LIVE or AFFECT_CONFIG after the virDomainLiveConfigHelperMethod call. By adding a "sa_assert()" to confirm that fact, Coverity is happy again.
This commit is contained in:
parent
72b4151f85
commit
121fc4f9f3
@ -17000,6 +17000,8 @@ qemuDomainGetBlockIoTune(virDomainPtr dom,
|
||||
if (virDomainLiveConfigHelperMethod(caps, driver->xmlopt, vm, &flags,
|
||||
&persistentDef) < 0)
|
||||
goto endjob;
|
||||
sa_assert((flags & VIR_DOMAIN_AFFECT_LIVE) ||
|
||||
(flags & VIR_DOMAIN_AFFECT_CONFIG));
|
||||
|
||||
if (flags & VIR_DOMAIN_AFFECT_LIVE) {
|
||||
/* If the VM is running, we can check if the current VM can use
|
||||
|
Loading…
Reference in New Issue
Block a user