mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
xen: Add coverity[ptr_arith] and [sign_extension] tags
The old cpu bitmap setting algorithm causes a couple of complaints which have been tagged.
This commit is contained in:
parent
316ed4128b
commit
8b55992f4e
@ -1795,8 +1795,11 @@ virXen_setvcpumap(int handle, int id, unsigned int vcpu,
|
||||
return -1;
|
||||
|
||||
memset(pm, 0, sizeof(cpumap_t));
|
||||
for (j = 0; j < maplen; j++)
|
||||
for (j = 0; j < maplen; j++) {
|
||||
/* coverity[ptr_arith] */
|
||||
/* coverity[sign_extension] */
|
||||
*(pm + (j / 8)) |= cpumap[j] << (8 * (j & 7));
|
||||
}
|
||||
|
||||
if (hv_versions.hypervisor == 1) {
|
||||
xen_op_v1 op;
|
||||
|
Loading…
Reference in New Issue
Block a user