]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
admin: Don't check the output of virGetUserRuntimeDirectory()
authorFabiano Fidêncio <fidencio@redhat.com>
Thu, 19 Dec 2019 09:41:33 +0000 (10:41 +0100)
committerFabiano Fidêncio <fidencio@redhat.com>
Fri, 20 Dec 2019 08:38:43 +0000 (09:38 +0100)
virGetUserRuntimeDirectory() *never* *ever* returns NULL, making the
checks for it completely unnecessary.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/admin/libvirt-admin.c

index 8a43dbf1de600e9e32e0ba7c2115429b1f72655d..4099a5485454413e892440e97249c1871549737b 100644 (file)
@@ -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,