Re: [PATCH 11/33] qemu: Clean up qemuDomainDefaultNetModel()

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

 



On Wed, Jan 24, 2024 at 20:37:31 +0100, Andrea Bolognani wrote:
> Group things together where it makes sense, avoid unnecessary
> uses of 'else if', plus other tweaks.
> 
> Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
> ---
>  src/qemu/qemu_domain.c | 18 ++++++++----------
>  1 file changed, 8 insertions(+), 10 deletions(-)


> @@ -5427,9 +5425,9 @@ qemuDomainDefaultNetModel(const virDomainDef *def,
>       * system than the previous one */
>      if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_RTL8139))
>          return VIR_DOMAIN_NET_MODEL_RTL8139;
> -    else if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_E1000))
> +    if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_E1000))
>          return VIR_DOMAIN_NET_MODEL_E1000;
> -    else if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_NET))
> +    if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_NET))
>          return VIR_DOMAIN_NET_MODEL_VIRTIO;

Separate these by empty lines once you've broke up the 'else if'
pattern.

Reviewed-by: Peter Krempa <pkrempa@xxxxxxxxxx>
_______________________________________________
Devel mailing list -- devel@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx




[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