virGetUserConfigDirectory() *never* *ever* returns NULL, making the checks for it completely unnecessary. Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx> --- src/qemu/qemu_conf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index 634c65095e..aa96d50e41 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -177,8 +177,7 @@ virQEMUDriverConfigPtr virQEMUDriverConfigNew(bool privileged) cfg->swtpmStateDir = g_strdup_printf("%s/swtpm", cfg->stateDir); - if (!(cfg->configBaseDir = virGetUserConfigDirectory())) - return NULL; + cfg->configBaseDir = virGetUserConfigDirectory(); cfg->libDir = g_strdup_printf("%s/qemu/lib", cfg->configBaseDir); cfg->saveDir = g_strdup_printf("%s/qemu/save", cfg->configBaseDir); -- 2.24.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list