[PATCH 2/6] remote: remove variable whose value is a constant

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The 'rv' variable is never changed after being declared, so can be
removed.

Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
---
 src/remote/remote_daemon_dispatch.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/remote/remote_daemon_dispatch.c b/src/remote/remote_daemon_dispatch.c
index fcd602304f..df28259042 100644
--- a/src/remote/remote_daemon_dispatch.c
+++ b/src/remote/remote_daemon_dispatch.c
@@ -3659,7 +3659,6 @@ remoteDispatchAuthSaslStart(virNetServerPtr server,
     const char *serverout;
     size_t serveroutlen;
     int err;
-    int rv = -1;
     struct daemonClientPrivate *priv =
         virNetServerClientGetPrivateData(client);
     const char *identity;
@@ -3739,8 +3738,7 @@ remoteDispatchAuthSaslStart(virNetServerPtr server,
     virResetLastError();
     virReportError(VIR_ERR_AUTH_FAILED, "%s",
                    _("authentication failed"));
-    if (rv < 0)
-        virNetMessageSaveError(rerr);
+    virNetMessageSaveError(rerr);
     virMutexUnlock(&priv->lock);
     return -1;
 }
@@ -3757,7 +3755,6 @@ remoteDispatchAuthSaslStep(virNetServerPtr server,
     const char *serverout;
     size_t serveroutlen;
     int err;
-    int rv = -1;
     struct daemonClientPrivate *priv =
         virNetServerClientGetPrivateData(client);
     const char *identity;
@@ -3837,8 +3834,7 @@ remoteDispatchAuthSaslStep(virNetServerPtr server,
     virResetLastError();
     virReportError(VIR_ERR_AUTH_FAILED, "%s",
                    _("authentication failed"));
-    if (rv < 0)
-        virNetMessageSaveError(rerr);
+    virNetMessageSaveError(rerr);
     virMutexUnlock(&priv->lock);
     return -1;
 }
-- 
2.20.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux