----- 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. 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... Paolo > > -- > Eduardo