[libvirt] [PATCH] conf: Fix initialization value of 'multi' in PCI address
Andrea Bolognani
abologna at redhat.com
Tue Aug 9 09:25:43 UTC 2016
On Tue, 2016-08-09 at 11:19 +0200, Martin Kletzander wrote:
> > for (i = 0; i < nAddrNodes; i++) {
> > - virPCIDeviceAddress addr = { 0, 0, 0, 0, 0 };
> > + virPCIDeviceAddress addr = { 0, 0, 0, 0, false };
>
> Honestly, I have no idea what preferences we have for such
> initializations, but I for one prefer initialization to '{0}' which
> guarantees everything to be zeroed anyway. And will be readable the
> same way even when we change the structure. Would that work for you as
> well?
I think it should either be 0 (as the structure member is
defined as int) or VIR_TRISTATE_SWITCH_ABSENT (as it is used
as virTristateSwitch, according to the comment and other bits
of code). false definitely seems out of place.
--
Andrea Bolognani / Red Hat / Virtualization
More information about the libvir-list
mailing list