[libvirt PATCH 02/10] remote: stop checking for errors from socket allocations

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

 



The remoteGetUNIXSocketHelper method always returns a non-NULL string.

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

diff --git a/src/remote/remote_sockets.c b/src/remote/remote_sockets.c
index 43f78023fe..e9d865213f 100644
--- a/src/remote/remote_sockets.c
+++ b/src/remote/remote_sockets.c
@@ -155,12 +155,10 @@ remoteGetUNIXSocket(remoteDriverTransport transport,
 
     legacy_daemon = g_strdup("libvirtd");
 
-    if (driver &&
-        !(direct_sock_name = remoteGetUNIXSocketHelper(transport, direct_daemon, ro, session)))
-        return NULL;
+    if (driver)
+        direct_sock_name = remoteGetUNIXSocketHelper(transport, direct_daemon, ro, session);
 
-    if (!(legacy_sock_name = remoteGetUNIXSocketHelper(transport, "libvirt", ro, session)))
-        return NULL;
+    legacy_sock_name = remoteGetUNIXSocketHelper(transport, "libvirt", ro, session);
 
     if (mode == REMOTE_DRIVER_MODE_AUTO) {
         if (transport == REMOTE_DRIVER_TRANSPORT_UNIX) {
-- 
2.31.1




[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