mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-30 18:03:32 +00:00
interface: 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
7dd205c74b
commit
ac5a58dad6
@ -105,8 +105,7 @@ netcfStateInitialize(bool privileged,
|
|||||||
} else {
|
} else {
|
||||||
g_autofree char *rundir = NULL;
|
g_autofree char *rundir = NULL;
|
||||||
|
|
||||||
if (!(rundir = virGetUserRuntimeDirectory()))
|
rundir = virGetUserRuntimeDirectory();
|
||||||
goto error;
|
|
||||||
driver->stateDir = g_strdup_printf("%s/interface/run", rundir);
|
driver->stateDir = g_strdup_printf("%s/interface/run", rundir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1160,8 +1160,7 @@ udevStateInitialize(bool privileged,
|
|||||||
} else {
|
} else {
|
||||||
g_autofree char *rundir = NULL;
|
g_autofree char *rundir = NULL;
|
||||||
|
|
||||||
if (!(rundir = virGetUserRuntimeDirectory()))
|
rundir = virGetUserRuntimeDirectory();
|
||||||
goto cleanup;
|
|
||||||
driver->stateDir = g_strdup_printf("%s/interface/run", rundir);
|
driver->stateDir = g_strdup_printf("%s/interface/run", rundir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user