Fix sign compare offendersv9.1.0
commit4b51aedfc721eb05c79f2c12c4654a173640009d
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 13 Feb 2023 08:03:55 +0000 (13 09:03 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 13 Feb 2023 14:42:58 +0000 (13 15:42 +0100)
tree81a7eeca203271c6f1493f1cf6cb56246b75a977
parent96f8a19bab9df145ab73b26ca2593c62973695c3
Fix sign compare offenders

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>
libvirt-override.c
libvirt-qemu-override.c