[PATCH 14/42] util: 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>
---
 src/util/virlog.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/util/virlog.c b/src/util/virlog.c
index 10639d7328..6bae56e2e3 100644
--- a/src/util/virlog.c
+++ b/src/util/virlog.c
@@ -180,8 +180,7 @@ virLogSetDefaultOutputToFile(const char *binary, bool privileged)
         virLogDefaultOutput = g_strdup_printf("%d:file:%s/log/libvirt/%s.log",
                                               virLogDefaultPriority, LOCALSTATEDIR, binary);
     } else {
-        if (!(logdir = virGetUserCacheDirectory()))
-            return -1;
+        logdir = virGetUserCacheDirectory();
 
         old_umask = umask(077);
         if (virFileMakePath(logdir) < 0) {
-- 
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