`feature` is always one of the values listed in the switch,
ensured by `virDomainKVMTypeFromString` above.
Signed-off-by: Tim Wiederhake <twiederh(a)redhat.com>
---
src/conf/domain_conf.c | 18 ++++--------------
1 file changed, 4 insertions(+), 14 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 2ad4cbc5a3..62565601ab 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -17418,21 +17418,11 @@ virDomainFeaturesKVMDefParse(virDomainDef *def,
return -1;
}
- switch ((virDomainKVM) feature) {
- case VIR_DOMAIN_KVM_HIDDEN:
- case VIR_DOMAIN_KVM_DEDICATED:
- case VIR_DOMAIN_KVM_POLLCONTROL:
- if (virXMLPropTristateSwitch(node, "state",
- VIR_XML_PROP_REQUIRED,
- &value) < 0)
- return -1;
-
- def->kvm_features[feature] = value;
- break;
+ if (virXMLPropTristateSwitch(node, "state", VIR_XML_PROP_REQUIRED,
+ &value) < 0)
+ return -1;
- case VIR_DOMAIN_KVM_LAST:
- break;
- }
+ def->kvm_features[feature] = value;
node = xmlNextElementSibling(node);
}
--
2.31.1