[PATCH 12/42] vbox: Don't check the output of virGetUserCacheDirectory()

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

 



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

Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx>
---
 src/vbox/vbox_common.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c
index 586937fa19..4493fe8582 100644
--- a/src/vbox/vbox_common.c
+++ b/src/vbox/vbox_common.c
@@ -7374,9 +7374,8 @@ vboxDomainScreenshot(virDomainPtr dom,
 
     if (privileged) {
         cacheDir = g_strdup_printf("%s/cache/libvirt", LOCALSTATEDIR);
-    } else if (!(cacheDir = virGetUserCacheDirectory())) {
-        VBOX_RELEASE(machine);
-        return NULL;
+    } else {
+        cacheDir = virGetUserCacheDirectory();
     }
 
     tmp = g_strdup_printf("%s/vbox.screendump.XXXXXX", cacheDir);
-- 
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