On Thu, Jan 18, 2018 at 05:19:56PM -0500, Paolo Bonzini wrote: > > ----- Eduardo Habkost <ehabk...@redhat.com> ha scritto: > > We can do some effort to document the preferred convention to > > return success/failure, but I don't think we will be able to > > convert the existing void/ret/bool functions to a single style > > (whatever it is) in a reasonable time. > > > > That said, IMO returning 0/-1 or true/false is always preferred > > to returning void, so there's no need to add more local_err > > boilerplate code. > > I strongly prefer having one way to say things, and having return value and > Error* > (with no clear winner for return value) is a disadvantage. [...]
I sympathize with this argument. ...wait, now we're repeating the discussion from the previous thread: https://www.mail-archive.com/qemu-devel@nongnu.org/msg461702.html > [...] Your solution is > slightly more verbose in that it makes it harder to use && and ||, but I am > not > even sure it is a disadvantage. And the clear advantage that a full > conversion > is mandatory and can be automated... Well, even if we don't decide about void vs non-void right now, we would still need something better to live with until a conversion to non-void is finished. I think I should rebase and resubmit my ERR_IS_SET series. -- Eduardo