virGetUserCacheDirectory() *never* *ever* returns NULL, making the
checks for it completely unnecessary.
Signed-off-by: Fabiano FidĂȘncio <fidencio(a)redhat.com>
---
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