src: QemuMonitorCommandWithFiles: report error when fd passing is unsupported

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>
This commit is contained in:
Ján Tomko 2022-05-18 15:56:23 +02:00
parent 25072c0304
commit b8a2d96758

View 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"));