From 8e681cdab9a0c93208bbd7f1c8e82998356f4019 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Thu, 19 Dec 2019 10:41:33 +0100 Subject: [PATCH] admin: 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/admin/libvirt-admin.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/admin/libvirt-admin.c b/src/admin/libvirt-admin.c index 8a43dbf1de..4099a54854 100644 --- a/src/admin/libvirt-admin.c +++ b/src/admin/libvirt-admin.c @@ -147,9 +147,6 @@ getSocketPath(virURIPtr uri) if (STREQ_NULLABLE(uri->path, "/system")) { sock_path = g_strdup_printf(RUNSTATEDIR "/libvirt/%s", sockbase); } else if (STREQ_NULLABLE(uri->path, "/session")) { - if (!rundir) - return NULL; - sock_path = g_strdup_printf("%s/%s", rundir, sockbase); } else { virReportError(VIR_ERR_CONFIG_UNSUPPORTED,