Re: [libvirt PATCH 06/10] virDomainActualNetDefParseXML: Use virXMLProp*

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

 



On Fri, 2021-04-23 at 15:35 +0200, Ján Tomko wrote:
> On a Friday in 2021, Tim Wiederhake wrote:
> > 
> > (...)
> >
> > +                goto error;
> > +
> > +            if (rc)
> > +                actual->data.direct.mode = mode;
> 
> You can just pass actual->data.direct.mode as an argument to the
> virXMLPropEnum call, eliminating the need for this if and both of the
> local variables, unless I'm missing something.

acutal->data.direct.mode is an int, so we have to do the extra step.

> >         }
> >     } else if (actual->type == VIR_DOMAIN_NET_TYPE_HOSTDEV) {
> >         virDomainHostdevDef *hostdev = &actual->data.hostdev.def;
> 
> With that addressed:
> Reviewed-by: Ján Tomko <jtomko@xxxxxxxxxx>
> 
> Jano




[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