apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: [PATCH] apr_dir_remove_recursively
Date Wed, 23 May 2001 22:22:54 GMT
On Wed, May 23, 2001 at 09:15:20AM -0500, Ben Collins-Sussman wrote:
> Greg Stein <gstein@lyra.org> writes:
> > 1) APR_STATUS_IS_SUCCESS is kind of a bogus macro; by definition,
> >    APR_SUCCESS is zero. Testing it can be done more clearly than using the
> >    macro.
> Really?  I prefer just to check for zeroness myself, but I swear I
> remember being scolded for not using this macro.  Maybe it's just a
> holdover from Karl's paranoia.

Yes, really. APR_STATUS_IS_* for *other* errors is "required". But for
success, it isn't and if you look at all the code around, we don't use that

I prefer to check against APR_SUCCESS, but there is also a lot of "if"
statements that assume zero-ness for APR_SUCCESS. And that is valid, as we
*semantically* defined APR_SUCCESS to be zero.


Greg Stein, http://www.lyra.org/

View raw message