1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-23 21:34:54 +03:00

virDomainFeaturesKVMDefParse: Remove tautological "switch"

`feature` is always one of the values listed in the switch,
ensured by `virDomainKVMTypeFromString` above.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Tim Wiederhake 2021-06-22 14:22:48 +02:00 committed by Michal Privoznik
parent 3c5e607b24
commit e2bce45829

View File

@ -17418,21 +17418,11 @@ virDomainFeaturesKVMDefParse(virDomainDef *def,
return -1; return -1;
} }
switch ((virDomainKVM) feature) { if (virXMLPropTristateSwitch(node, "state", VIR_XML_PROP_REQUIRED,
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) &value) < 0)
return -1; return -1;
def->kvm_features[feature] = value; def->kvm_features[feature] = value;
break;
case VIR_DOMAIN_KVM_LAST:
break;
}
node = xmlNextElementSibling(node); node = xmlNextElementSibling(node);
} }