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

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

 



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

diff --git a/src/hyperv/hyperv_wmi.c b/src/hyperv/hyperv_wmi.c
index b113283aeb..dc2c6471ab 100644
--- a/src/hyperv/hyperv_wmi.c
+++ b/src/hyperv/hyperv_wmi.c
@@ -275,7 +275,7 @@ hypervCreateEmbeddedParam(hypervWmiClassInfo *classInfo)
 {
     size_t i;
     size_t count;
-    g_autoptr(GHashTable) table = NULL;
+    g_autoptr(GHashTable) table = virHashNew(NULL);
     XmlSerializerInfo *typeinfo = NULL;
 
     typeinfo = classInfo->serializerInfo;
@@ -284,10 +284,6 @@ hypervCreateEmbeddedParam(hypervWmiClassInfo *classInfo)
     for (count = 0; typeinfo[count].name != NULL; count++)
         ;
 
-    table = virHashNew(NULL);
-    if (table == NULL)
-        return NULL;
-
     for (i = 0; typeinfo[i].name != NULL; i++) {
         XmlSerializerInfo *item = &typeinfo[i];
 
-- 
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