[libvirt-designer][PATCH 2/3] get_supported_disk_bus_types: NULL is valid list

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

 



There is no need to check return value of g_hash_table_get_keys()
which is passed to g_list_copy as even NULL is valid list in glib.
---
 libvirt-designer/libvirt-designer-domain.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/libvirt-designer/libvirt-designer-domain.c b/libvirt-designer/libvirt-designer-domain.c
index de69241..0d441df 100644
--- a/libvirt-designer/libvirt-designer-domain.c
+++ b/libvirt-designer/libvirt-designer-domain.c
@@ -701,8 +701,7 @@ gvir_designer_domain_get_supported_disk_bus_types(GVirDesignerDomain *design)
     }
 
     ret = g_hash_table_get_keys(bus_hash);
-    if (ret)
-        ret = g_list_copy(ret);
+    ret = g_list_copy(ret);
 
 cleanup:
     g_hash_table_destroy(bus_hash);
-- 
1.7.8.6

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[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]