From 5922b2b104d60965fbf367e042dbb4dee366a424 Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Mon, 15 Feb 2021 17:13:22 +0100 Subject: [PATCH] qemu: Drop needless check in virDomainFSInfoFormat() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Ján Tomko --- src/qemu/qemu_driver.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 3d54653217..f59f9e13ba 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -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++) {