]> xenbits.xensource.com Git - libvirt.git/commitdiff
python: avoid unlikely sign extension bug
authorEric Blake <eblake@redhat.com>
Tue, 2 Aug 2011 16:03:41 +0000 (10:03 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 2 Aug 2011 17:57:07 +0000 (11:57 -0600)
Detected by Coverity; same analysis as for commit f73198df.

* python/libvirt-override.c (libvirt_virDomainGetVcpuPinInfo): Use
correct type.

python/libvirt-override.c

index aa844386f4c436f1c22fe7c8793f08c2fe9baf5b..b5650e2c024d8c617975595fdb4491ec05003709 100644 (file)
@@ -1114,7 +1114,7 @@ libvirt_virDomainGetVcpuPinInfo(PyObject *self ATTRIBUTE_UNUSED,
     virNodeInfo nodeinfo;
     virDomainInfo dominfo;
     unsigned char *cpumaps;
-    int cpumaplen, vcpu, pcpu;
+    size_t cpumaplen, vcpu, pcpu;
     unsigned int flags;
     int i_retval;