virGetUserRuntimeDirectory() *never* *ever* returns NULL, making the
checks for it completely unnecessary.
Signed-off-by: Fabiano FidĂȘncio <fidencio(a)redhat.com>
---
src/interface/interface_backend_netcf.c | 3 +--
src/interface/interface_backend_udev.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/interface/interface_backend_netcf.c
b/src/interface/interface_backend_netcf.c
index 4f46717cf3..65cb7eae62 100644
--- a/src/interface/interface_backend_netcf.c
+++ b/src/interface/interface_backend_netcf.c
@@ -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);
}
diff --git a/src/interface/interface_backend_udev.c
b/src/interface/interface_backend_udev.c
index 26b1045f8a..7cc098eb33 100644
--- a/src/interface/interface_backend_udev.c
+++ b/src/interface/interface_backend_udev.c
@@ -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);
}
--
2.24.1