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

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

 



Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx>
---
 src/conf/virstorageobj.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/conf/virstorageobj.c b/src/conf/virstorageobj.c
index 6c8a06e8bc..2b6932d7e5 100644
--- a/src/conf/virstorageobj.c
+++ b/src/conf/virstorageobj.c
@@ -170,12 +170,9 @@ virStorageVolObjListNew(void)
     if (!(vols = virObjectRWLockableNew(virStorageVolObjListClass)))
         return NULL;
 
-    if (!(vols->objsKey = virHashNew(virObjectFreeHashData)) ||
-        !(vols->objsName = virHashNew(virObjectFreeHashData)) ||
-        !(vols->objsPath = virHashNew(virObjectFreeHashData))) {
-        virObjectUnref(vols);
-        return NULL;
-    }
+    vols->objsKey = virHashNew(virObjectFreeHashData);
+    vols->objsName = virHashNew(virObjectFreeHashData);
+    vols->objsPath = virHashNew(virObjectFreeHashData);
 
     return vols;
 }
-- 
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