提交 94c227de 编写于 作者: F Fabiano Fidêncio

util: Don't check the output of virGetUserCacheDirectory()

virGetUserCacheDirectory() *never* *ever* returns NULL, making the
checks for it completely unnecessary.
Signed-off-by: NFabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 e09f723b
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册