mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
node_device: Don't check the output of virGetUserRuntimeDirectory()
virGetUserRuntimeDirectory() *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>
This commit is contained in:
parent
2c38781792
commit
b311ae9e5b
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user