From: Tim Wiederhake Date: Mon, 5 Jul 2021 14:54:01 +0000 (+0200) Subject: virDomainDefBootOrderPostParse: `virHashNew` cannot return NULL X-Git-Tag: v7.6.0-rc1~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c94a217e5c5960a463ce74663a839564475b7d40;p=thirdparty%2Flibvirt.git virDomainDefBootOrderPostParse: `virHashNew` cannot return NULL Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index ddf03252ab..06c1fcf5e5 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -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;