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(a)redhat.com>
Jano