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

node_device: 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>
上级 2c387817
......@@ -618,8 +618,7 @@ nodeStateInitialize(bool privileged G_GNUC_UNUSED,
} else {
g_autofree char *rundir = NULL;
if (!(rundir = virGetUserRuntimeDirectory()))
goto failure;
rundir = virGetUserRuntimeDirectory();
driver->stateDir = g_strdup_printf("%s/nodedev/run", rundir);
}
......
......@@ -1806,8 +1806,7 @@ nodeStateInitialize(bool privileged,
} else {
g_autofree char *rundir = NULL;
if (!(rundir = virGetUserRuntimeDirectory()))
goto cleanup;
rundir = virGetUserRuntimeDirectory();
driver->stateDir = g_strdup_printf("%s/nodedev/run", rundir);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册