summaryrefslogtreecommitdiff
path: root/libvirt-qemu-override.c
diff options
context:
space:
mode:
authorMichal Privoznik <mprivozn@redhat.com>2023-02-13 09:03:55 +0100
committerMichal Privoznik <mprivozn@redhat.com>2023-02-13 15:42:58 +0100
commit4b51aedfc721eb05c79f2c12c4654a173640009d (patch)
tree81a7eeca203271c6f1493f1cf6cb56246b75a977 /libvirt-qemu-override.c
parent96f8a19bab9df145ab73b26ca2593c62973695c3 (diff)
downloadlibvirt-python-4b51aedfc721eb05c79f2c12c4654a173640009d.tar.gz
Fix sign compare offendersv9.1.0
In a few places we compare signed and unsigned integers. In majority of cases it's because the iteration variable is declared as ssize_t but then in the for() loop it's compared against an unsigned int. But there is one case where the opposite happens (libvirt_virDomainSendKey()), or where an UINT_MAX (which is inherently unsigned) is compared against signed long. Also, use this opportunity to decrease scope of 'j' variable inside of libvirt_virDomainInterfaceAddresses(). Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Diffstat (limited to 'libvirt-qemu-override.c')
-rw-r--r--libvirt-qemu-override.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libvirt-qemu-override.c b/libvirt-qemu-override.c
index a554498..ef72d51 100644
--- a/libvirt-qemu-override.c
+++ b/libvirt-qemu-override.c
@@ -343,7 +343,7 @@ libvirt_qemu_virDomainQemuMonitorCommandWithFiles(PyObject *self ATTRIBUTE_UNUSE
unsigned int noutfiles = 0;
int *outfiles = NULL;
char *result = NULL;
- ssize_t i;
+ size_t i;
PyObject *py_outfiles = NULL;
PyObject *py_retval = NULL;
int c_retval;