[libvirt PATCH 12/38] qemuBlockNodeNamesDetect: `virHashNew` cannot return NULL

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

 



Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx>
---
 src/qemu/qemu_block.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
index 6627d044cd..2815eb54fa 100644
--- a/src/qemu/qemu_block.c
+++ b/src/qemu/qemu_block.c
@@ -365,10 +365,7 @@ qemuBlockNodeNamesDetect(virQEMUDriver *driver,
 GHashTable *
 qemuBlockGetNodeData(virJSONValue *data)
 {
-    g_autoptr(GHashTable) nodedata = NULL;
-
-    if (!(nodedata = virHashNew(virJSONValueHashFree)))
-        return NULL;
+    g_autoptr(GHashTable) nodedata = virHashNew(virJSONValueHashFree);
 
     if (virJSONValueArrayForeachSteal(data,
                                       qemuBlockNamedNodesArrayToHash, nodedata) < 0)
-- 
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