[PATCH 4/9] xen: Add coverity[ptr_arith] and [sign_extension] tags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The old cpu bitmap setting algorithm causes a couple of complaints which
have been tagged.
---
 src/xen/xen_hypervisor.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/xen/xen_hypervisor.c b/src/xen/xen_hypervisor.c
index a770f53..bfee56d 100644
--- a/src/xen/xen_hypervisor.c
+++ b/src/xen/xen_hypervisor.c
@@ -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;
-- 
1.7.11.7

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]