virGetUserConfigDirectory() *never* *ever* returns NULL, making the
checks for it completely unnecessary.
Signed-off-by: Fabiano FidĂȘncio <fidencio(a)redhat.com>
---
src/locking/lock_daemon_config.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/src/locking/lock_daemon_config.c b/src/locking/lock_daemon_config.c
index 62df30d9f4..c67b0a75e1 100644
--- a/src/locking/lock_daemon_config.c
+++ b/src/locking/lock_daemon_config.c
@@ -43,16 +43,12 @@ virLockDaemonConfigFilePath(bool privileged, char **configfile)
} else {
g_autofree char *configdir = NULL;
- if (!(configdir = virGetUserConfigDirectory()))
- goto error;
+ configdir = virGetUserConfigDirectory();
*configfile = g_strdup_printf("%s/virtlockd.conf", configdir);
}
return 0;
-
- error:
- return -1;
}
--
2.24.1