]> git.ipfire.org Git - thirdparty/libvirt.git/commit
gendispatch: Avoid comparing signed and unsigned vars
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 16 Mar 2016 09:24:38 +0000 (10:24 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 24 Mar 2016 09:49:39 +0000 (10:49 +0100)
commit9b48ef9c51e0c4be46de2fad4d1a5cc4682c53c7
treeb93fd536ce49c5fb2b1e6112fc3110be7f8494c8
parentcbe289d814dda6095bd0482249846d9fe70d999d
gendispatch: Avoid comparing signed and unsigned vars

The adminDispatchConnectListServers() function is generated by
our great perl script. However, it has a tiny flaw: if
adminConnectListServers() it calls fails, the control jumps onto
cleanup label where we try to free any list of servers built so
far. However, in the loop @i is unsigned (size_t) while @nresults
is signed (int). Currently, it does no harm because of the check
for @result being non-NULL. But if that ever changes in the
future, this bug will be hard to chase.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/rpc/gendispatch.pl