提交 121fc4f9 编写于 作者: J John Ferlan

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.
上级 72b4151f
...@@ -17000,6 +17000,8 @@ qemuDomainGetBlockIoTune(virDomainPtr dom, ...@@ -17000,6 +17000,8 @@ qemuDomainGetBlockIoTune(virDomainPtr dom,
if (virDomainLiveConfigHelperMethod(caps, driver->xmlopt, vm, &flags, if (virDomainLiveConfigHelperMethod(caps, driver->xmlopt, vm, &flags,
&persistentDef) < 0) &persistentDef) < 0)
goto endjob; goto endjob;
sa_assert((flags & VIR_DOMAIN_AFFECT_LIVE) ||
(flags & VIR_DOMAIN_AFFECT_CONFIG));
if (flags & VIR_DOMAIN_AFFECT_LIVE) { if (flags & VIR_DOMAIN_AFFECT_LIVE) {
/* If the VM is running, we can check if the current VM can use /* If the VM is running, we can check if the current VM can use
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册