From 1fc8314d38d9752b868e0e26b595819e249057f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Thu, 19 Dec 2019 10:27:49 +0100 Subject: [PATCH] network: Don't check the output of virGetUserRuntimeDirectory() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit virGetUserRuntimeDirectory() *never* *ever* returns NULL, making the checks for it completely unnecessary. Signed-off-by: Fabiano Fidêncio Reviewed-by: Ján Tomko --- src/network/bridge_driver.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 98aa530715..c9c45df758 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -741,8 +741,6 @@ networkStateInitialize(bool privileged, } else { configdir = virGetUserConfigDirectory(); rundir = virGetUserRuntimeDirectory(); - if (!rundir) - goto error; network_driver->networkConfigDir = g_strdup_printf("%s/qemu/networks", configdir); network_driver->networkAutostartDir = g_strdup_printf("%s/qemu/networks/autostart", configdir);