[PATCH 42/42] admin: Don't check the output of virGetUserRuntimeDirectory()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



virGetUserRuntimeDirectory() *never* *ever* returns NULL, making the
checks for it completely unnecessary.

Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx>
---
 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 d0c191a56a..dcbb8ca84d 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)
-                goto error;
-
             sock_path = g_strdup_printf("%s/%s", rundir, sockbase);
         } else {
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-- 
2.24.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux