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 <abolo...@redhat.com>
> ---
>  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 <pkre...@redhat.com>
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-le...@lists.libvirt.org

Reply via email to