mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 06:35:24 +00:00
qemu: silence coverity false positives
Coverity gets confused by our logic. Add some hints to silence false positives. * src/qemu/qemu_driver.c (qemudDomainGetVcpuPinInfo): Add hint. (qemuDomainGetMemoryParameters): Likewise.
This commit is contained in:
parent
c86827a243
commit
f768b4c3e9
@ -3432,6 +3432,9 @@ qemudDomainGetVcpuPinInfo(virDomainPtr dom,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* Coverity didn't realize that targetDef must be set if we got here. */
|
||||
sa_assert(targetDef);
|
||||
|
||||
if (nodeGetInfo(dom->conn, &nodeinfo) < 0)
|
||||
goto cleanup;
|
||||
hostcpus = VIR_NODEINFO_MAXCPUS(nodeinfo);
|
||||
@ -6139,6 +6142,9 @@ static int qemuDomainGetMemoryParameters(virDomainPtr dom,
|
||||
param->value.ul = 0;
|
||||
param->type = VIR_TYPED_PARAM_ULLONG;
|
||||
|
||||
/* Coverity does not realize that if we get here, group is set. */
|
||||
sa_assert(group);
|
||||
|
||||
switch (i) {
|
||||
case 0: /* fill memory hard limit here */
|
||||
rc = virCgroupGetMemoryHardLimit(group, &val);
|
||||
|
Loading…
Reference in New Issue
Block a user