[PATCH 17/42] remote: Don't check the output of virGetUserConfigDirectory()

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

 



virGetUserConfigDirectory() *never* *ever* returns NULL, making the
checks for it completely unnecessary.

Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx>
---
 src/remote/remote_daemon_config.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/remote/remote_daemon_config.c b/src/remote/remote_daemon_config.c
index ae6b491686..84e331474b 100644
--- a/src/remote/remote_daemon_config.c
+++ b/src/remote/remote_daemon_config.c
@@ -81,17 +81,13 @@ daemonConfigFilePath(bool privileged, char **configfile)
     } else {
         char *configdir = NULL;
 
-        if (!(configdir = virGetUserConfigDirectory()))
-            goto error;
+        configdir = virGetUserConfigDirectory();
 
         *configfile = g_strdup_printf("%s/%s.conf", configdir, DAEMON_NAME);
         VIR_FREE(configdir);
     }
 
     return 0;
-
- error:
-    return -1;
 }
 
 struct daemonConfig*
-- 
2.24.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