We can move the @model reset inside the switch case for
VIR_DOMAIN_CONTROLLER_TYPE_SCSI since it is the only case
that uses an altered model name.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
src/qemu/qemu_command.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index d9cbdff83..7aa5f5dd1 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -2662,13 +2662,11 @@ qemuBuildControllerDevStr(const virDomainDef *domainDef,
*devstr = NULL;
- if (def->type == VIR_DOMAIN_CONTROLLER_TYPE_SCSI) {
+ switch ((virDomainControllerType) def->type) {
+ case VIR_DOMAIN_CONTROLLER_TYPE_SCSI:
if ((qemuDomainSetSCSIControllerModel(domainDef, qemuCaps, &model)) < 0)
return -1;
- }
- switch ((virDomainControllerType) def->type) {
- case VIR_DOMAIN_CONTROLLER_TYPE_SCSI:
switch (model) {
case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI:
if (def->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW) {
--
2.13.6