[libvirt PATCH 10/38] qemusecuritymock: init_hash: `virHashNew` cannot return NULL

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

 



Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx>
---
 tests/qemusecuritymock.c | 17 +++--------------
 1 file changed, 3 insertions(+), 14 deletions(-)

diff --git a/tests/qemusecuritymock.c b/tests/qemusecuritymock.c
index 5daf27ccd7..87aadf564e 100644
--- a/tests/qemusecuritymock.c
+++ b/tests/qemusecuritymock.c
@@ -100,20 +100,9 @@ init_hash(void)
     if (xattr_paths)
         return;
 
-    if (!(xattr_paths = virHashNew(g_free))) {
-        fprintf(stderr, "Unable to create hash table for XATTR paths\n");
-        abort();
-    }
-
-    if (!(chown_paths = virHashNew(g_free))) {
-        fprintf(stderr, "Unable to create hash table for chowned paths\n");
-        abort();
-    }
-
-    if (!(selinux_paths = virHashNew(g_free))) {
-        fprintf(stderr, "Unable to create hash table for selinux labels\n");
-        abort();
-    }
+    xattr_paths = virHashNew(g_free);
+    chown_paths = virHashNew(g_free);
+    selinux_paths = virHashNew(g_free);
 }
 
 
-- 
2.31.1




[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