On Thu, Aug 11, 2016 at 05:39:06PM +0800, Xian Han Yu wrote: > > > On 8/11/2016 5:00 PM, Daniel P. Berrange wrote: > > On Thu, Aug 11, 2016 at 10:55:44AM +0200, Andrea Bolognani wrote: > > > On Thu, 2016-08-11 at 14:48 +0800, Xian Han Yu wrote: > > > > > The default is not OFF, though, it's ABSENT :) > > > > > In fact, as far as I can tell, OFF isn't ever used explicitly > > > > > either for assignment or comparison. And false is plain wrong > > > > > from a datatype point of view. > > > > How about we change all three occurrences as boris list above > > > > into VIR_TRISTATE_SWITCH_ABSENT. > > > Sure, that's exactly what I suggested :) > > IMHO, we should just do what Michael suggested right at the start of this > > thread and use {0}, instead of manually initializing each field to > > 0, or a constant hiding the 0. > > That maybe change back again in the future, if this struct add a new member > or current member need to be not zero-initialized. Lets do what makes sense now, not in some hypothetical future that may never happen. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :| -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list