[PATCH 14/23] conf: Remove impossible error in virDomainDefFormatFeatures

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

 



'i' is always in range of the enum, thus the name is always populated by
virDomainFeatureTypeToString.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 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:
-- 
2.20.1

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

  Powered by Linux