]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virDomainDefBootOrderPostParse: `virHashNew` cannot return NULL
authorTim Wiederhake <twiederh@redhat.com>
Mon, 5 Jul 2021 14:54:01 +0000 (16:54 +0200)
committerTim Wiederhake <twiederh@redhat.com>
Fri, 23 Jul 2021 09:30:57 +0000 (11:30 +0200)
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
src/conf/domain_conf.c

index ddf03252abf1ca700fc95696f86026a193fb7dd7..06c1fcf5e5abdd47d49f0ac106f1b0e20a474dec 100644 (file)
@@ -5935,10 +5935,7 @@ virDomainDefCollectBootOrder(virDomainDef *def G_GNUC_UNUSED,
 static int
 virDomainDefBootOrderPostParse(virDomainDef *def)
 {
-    g_autoptr(GHashTable) bootHash = NULL;
-
-    if (!(bootHash = virHashNew(NULL)))
-        return -1;
+    g_autoptr(GHashTable) bootHash = virHashNew(NULL);
 
     if (virDomainDeviceInfoIterate(def, virDomainDefCollectBootOrder, bootHash) < 0)
         return -1;