[PATCH 10/42] tools: Don't check the output of virGetUserCacheDirectory()

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

 



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

Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx>
---
 tools/vsh.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/tools/vsh.c b/tools/vsh.c
index bbb6227130..b982aeb359 100644
--- a/tools/vsh.c
+++ b/tools/vsh.c
@@ -2913,11 +2913,6 @@ vshReadlineInit(vshControl *ctl)
      */
     userdir = virGetUserCacheDirectory();
 
-    if (userdir == NULL) {
-        vshError(ctl, "%s", _("Could not determine home directory"));
-        goto cleanup;
-    }
-
     ctl->historydir = g_strdup_printf("%s/%s", userdir, ctl->name);
 
     ctl->historyfile = g_strdup_printf("%s/history", ctl->historydir);
-- 
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