]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Drop needless check in virDomainFSInfoFormat()
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 15 Feb 2021 16:13:22 +0000 (17:13 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 16 Feb 2021 13:06:31 +0000 (14:06 +0100)
As the very first thing, this function checks whether the number
of items inside @agentinfo array is not negative. This is
redundant as the only caller - qemuDomainGetFSInfo() already
checked for that and would not even call this function if that
was the case.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_driver.c

index 3d54653217ba6224f7bd8431b5e8cead263e05f1..f59f9e13baafcebafdd195a5ca2d94ce8c5846f9 100644 (file)
@@ -18966,8 +18966,6 @@ virDomainFSInfoFormat(qemuAgentFSInfoPtr *agentinfo,
     virDomainFSInfoPtr *info_ret = NULL;
     size_t i;
 
-    if (nagentinfo < 0)
-        return ret;
     info_ret = g_new0(virDomainFSInfoPtr, nagentinfo);
 
     for (i = 0; i < nagentinfo; i++) {