On Thu, Dec 19, 2019 at 11:04:22AM +0100, Fabiano Fidêncio wrote:
virGetUserConfigDirectory() *never* *ever* returns NULL, making the
checks for it completely unnecessary.
Signed-off-by: Fabiano Fidêncio <fidencio(a)redhat.com>
---
src/remote/remote_daemon_config.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/src/remote/remote_daemon_config.c b/src/remote/remote_daemon_config.c
index ae6b491686..84e331474b 100644
--- a/src/remote/remote_daemon_config.c
+++ b/src/remote/remote_daemon_config.c
@@ -81,17 +81,13 @@ daemonConfigFilePath(bool privileged, char **configfile)
} else {
char *configdir = NULL;
- if (!(configdir = virGetUserConfigDirectory()))
- goto error;
+ configdir = virGetUserConfigDirectory();
*configfile = g_strdup_printf("%s/%s.conf", configdir, DAEMON_NAME);
VIR_FREE(configdir);
Another g_autofree opportunity
}
Reviewed-by: Ján Tomko <jtomko(a)redhat.com>
Jano