mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +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 {
|
||||
g_autofree char *rundir = NULL;
|
||||
|
||||
if (!(rundir = virGetUserRuntimeDirectory()))
|
||||
goto error;
|
||||
rundir = virGetUserRuntimeDirectory();
|
||||
driver->stateDir = g_strdup_printf("%s/interface/run", rundir);
|
||||
}
|
||||
|
||||
|
@ -1160,8 +1160,7 @@ udevStateInitialize(bool privileged,
|
||||
} else {
|
||||
g_autofree char *rundir = NULL;
|
||||
|
||||
if (!(rundir = virGetUserRuntimeDirectory()))
|
||||
goto cleanup;
|
||||
rundir = virGetUserRuntimeDirectory();
|
||||
driver->stateDir = g_strdup_printf("%s/interface/run", rundir);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user