]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
src: QemuMonitorCommandWithFiles: report error when fd passing is unsupported
authorJán Tomko <jtomko@redhat.com>
Wed, 18 May 2022 13:56:23 +0000 (15:56 +0200)
committerJán Tomko <jtomko@redhat.com>
Tue, 21 Jun 2022 13:49:11 +0000 (15:49 +0200)
The result of the <= 0 comparison was assigned to 'rc', rendering the
if (rc == 0) condition dead code.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
src/libvirt-qemu.c

index 5020b5dc1bfa5d094f8f2fe8d9c18bc944fba5db..ace91e8ada78f46c6ea494a231a808ccc7ab763f 100644 (file)
@@ -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"));