diff options
author | Fabiano Fidêncio <fidencio@redhat.com> | 2019-12-19 10:12:56 +0100 |
---|---|---|
committer | Fabiano Fidêncio <fidencio@redhat.com> | 2019-12-20 09:38:43 +0100 |
commit | 94c227de0a59e21b505cfd2dd7cdcf9e5360fb74 (patch) | |
tree | f87656168a543bbbc48812f5cc8bcf43e84be637 /src/util | |
parent | e09f723bf11d8bb771484f60663e5a1d830997e1 (diff) | |
download | libvirt-94c227de0a59e21b505cfd2dd7cdcf9e5360fb74.tar.gz |
util: Don't check the output of virGetUserCacheDirectory()
virGetUserCacheDirectory() *never* *ever* returns NULL, making the
checks for it completely unnecessary.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/virlog.c | 3 |
1 files changed, 1 insertions, 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) { |