qemu: Drop needless check in virDomainFSInfoFormat()

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>
This commit is contained in:
Michal Privoznik 2021-02-15 17:13:22 +01:00
parent 67f8ccb4e2
commit 5922b2b104

View 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++) {