The remoteGetUNIXSocketHelper method always returns a non-NULL string.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
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