From e0b3e4e11c0e14d90c1b94707abd85741cca7f17 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Tue, 5 Mar 2019 13:21:39 +0100 Subject: [PATCH] conf: Remove impossible error in virDomainDefFormatFeatures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 'i' is always in range of the enum, thus the name is always populated by virDomainFeatureTypeToString. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- src/conf/domain_conf.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 9ed153a71f..52022aed0b 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -27765,12 +27765,6 @@ virDomainDefFormatFeatures(virBufferPtr buf, const char *name = virDomainFeatureTypeToString(i); size_t j; - if (!name) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("unexpected feature %zu"), i); - goto error; - } - switch ((virDomainFeature) i) { case VIR_DOMAIN_FEATURE_ACPI: case VIR_DOMAIN_FEATURE_PAE: