Subject: Re: CVS commit: src/sys/arch/evbppc
To: None <source-changes@NetBSD.org>
From: Jachym Holecek <freza@dspfpga.com>
List: source-changes
Date: 02/27/2007 15:51:02
# David Young 2007-02-26:
> On Mon, Feb 26, 2007 at 01:24:19PM +0100, Jachym Holecek wrote:
> > BTW I think the proplib convention of returning true on success and
> > false on failure should change to the usual "zero on success, nonzero
> > on failure" (and preferrably errno value, rather than just "false").
> > All proplib callers I've seen do something like
> > 
> >   if (prop_foo(...) == false ||
> >       prop_bar(...) == false)
> > 	  ... deal with failure ...
> > 
> > anyway, so we can save ourselves the " == false" part plus be more
> > consistent with the rest of the source.
> 
> Can we also save ourselves the '== false' part using '!',

Sure.

> or am I missing something?

Not having to negate the return value on typical usage seems more
user-friendly to me... but that's of course easy to get used to,
perhaps at the price of some confusion if the rest of your source
goes with "zero on success" convention.

	-- Jachym