[libvirt PATCH 16/38] virChrdevAlloc: `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/virchrdev.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/conf/virchrdev.c b/src/conf/virchrdev.c
index 91f2b5a233..5d6de68427 100644
--- a/src/conf/virchrdev.c
+++ b/src/conf/virchrdev.c
@@ -265,13 +265,9 @@ virChrdevs *virChrdevAlloc(void)
 
     /* there will hardly be any devices most of the time, the hash
      * does not have to be huge */
-    if (!(devs->hash = virHashNew(virChrdevHashEntryFree)))
-        goto error;
+    devs->hash = virHashNew(virChrdevHashEntryFree);
 
     return devs;
- error:
-    virChrdevFree(devs);
-    return NULL;
 }
 
 /**
-- 
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