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