On Thu, Jan 25, 2024 at 11:12:33AM +0100, Peter Krempa wrote:
> On Wed, Jan 24, 2024 at 20:37:31 +0100, Andrea Bolognani wrote:
> > @@ -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.

When a bunch of capabilities are being checked one after the other in
first-one-wins fashion, I kinda find it more readable not to have
empty lines in between them, but I'm happy either way :)

-- 
Andrea Bolognani / Red Hat / Virtualization
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-le...@lists.libvirt.org

Reply via email to