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

diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c
index f011721beb..53b39923e8 100644
--- a/src/conf/domain_addr.c
+++ b/src/conf/domain_addr.c
@@ -1388,8 +1388,7 @@ virDomainCCWAddressSetCreate(void)
 
     addrs = g_new0(virDomainCCWAddressSet, 1);
 
-    if (!(addrs->defined = virHashNew(g_free)))
-        goto error;
+    addrs->defined = virHashNew(g_free);
 
     /* must use cssid = 0xfe (254) for virtio-ccw devices */
     addrs->next.cssid = 254;
@@ -1397,10 +1396,6 @@ virDomainCCWAddressSetCreate(void)
     addrs->next.devno = 0;
     addrs->next.assigned = 0;
     return addrs;
-
- error:
-    virDomainCCWAddressSetFree(addrs);
-    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