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:
Fabiano Fidêncio 2019-12-19 10:23:14 +01:00
parent 2c38781792
commit b311ae9e5b
2 changed files with 2 additions and 4 deletions

View File

@ -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);
}

View File

@ -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);
}