From 87df8493d5078bf53aebad0a500c091fcf39b913 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Thu, 19 Dec 2019 09:36:22 +0100 Subject: [PATCH] storage: Don't check the output of virGetUserConfigDirectory() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit virGetUserConfigDirectory() *never* *ever* returns NULL, making the checks for it completely unnecessary. Signed-off-by: Fabiano Fidêncio Reviewed-by: Ján Tomko --- src/storage/storage_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index 580a5e6f15..71078dfbd6 100644 --- a/src/storage/storage_driver.c +++ b/src/storage/storage_driver.c @@ -278,7 +278,7 @@ storageStateInitialize(bool privileged, } else { configdir = virGetUserConfigDirectory(); rundir = virGetUserRuntimeDirectory(); - if (!(configdir && rundir)) + if (!rundir) goto error; driver->configDir = g_strdup_printf("%s/storage", configdir);