From b8a2d9675875cb9cd117025ebd48c9c31c6affb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Wed, 18 May 2022 15:56:23 +0200 Subject: [PATCH] src: QemuMonitorCommandWithFiles: report error when fd passing is unsupported MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The result of the <= 0 comparison was assigned to 'rc', rendering the if (rc == 0) condition dead code. Signed-off-by: Ján Tomko Reviewed-by: Peter Krempa --- src/libvirt-qemu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libvirt-qemu.c b/src/libvirt-qemu.c index 5020b5dc1b..ace91e8ada 100644 --- a/src/libvirt-qemu.c +++ b/src/libvirt-qemu.c @@ -161,7 +161,7 @@ virDomainQemuMonitorCommandWithFiles(virDomainPtr domain, if (ninfiles > 0 || outfiles) { int rc; if ((rc = VIR_DRV_SUPPORTS_FEATURE(conn->driver, conn, - VIR_DRV_FEATURE_FD_PASSING) <= 0)) { + VIR_DRV_FEATURE_FD_PASSING)) <= 0) { if (rc == 0) virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s", _("fd passing is not supported by this connection"));