提交 01b2f93d 编写于 作者: F Fabiano Fidêncio

secret: Don't check the output of virGetUserRuntimeDirectory()

virGetUserRuntimeDirectory() *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>
上级 6207bee8
...@@ -478,8 +478,7 @@ secretStateInitialize(bool privileged, ...@@ -478,8 +478,7 @@ secretStateInitialize(bool privileged,
cfgdir = virGetUserConfigDirectory(); cfgdir = virGetUserConfigDirectory();
driver->configDir = g_strdup_printf("%s/secrets/", cfgdir); driver->configDir = g_strdup_printf("%s/secrets/", cfgdir);
if (!(rundir = virGetUserRuntimeDirectory())) rundir = virGetUserRuntimeDirectory();
goto error;
driver->stateDir = g_strdup_printf("%s/secrets/run", rundir); driver->stateDir = g_strdup_printf("%s/secrets/run", rundir);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册