Justin Erenkrantz <[EMAIL PROTECTED]> writes:
> Due to some recent confusion with SVN and APR_STATUS_IS_SUCCESS,
> I'd like to consider removing this macro and just forcing
> everyone to do either a non-zero check or checking against the
> APR_SUCCESS value (which isn't strictly needed because APR_SUCCESS
> will always be 0, but that's fine with me).
>
> Thoughts? I know most of our code in APR and httpd-2.0 is
> pretty good about not using APR_STATUS_IS_SUCCESS. -- justin
+1 if they always mean the same thing, but I'd like to first know the
answer to this question:
If APR_SUCCESS is absolutely and always defined to be zero, then why
does apr_errno.h define the APR_STATUS_IS_SUCCESS() macro like this
under WIN32
#define APR_STATUS_IS_SUCCESS(s) ((s) == APR_SUCCESS \
|| (s) == APR_OS_START_SYSERR + ERROR_SUCCESS)
and like this under OS2:
#define APR_STATUS_IS_SUCCESS(s) ((s) == APR_SUCCESS \
|| (s) == APR_OS_START_SYSERR + NO_ERROR)
That looks a bit more complex than just "== 0" to me... ?
Don't get me wrong: I too would like to test explicitly for it, but
the code above makes me think the macro is necessary (also, the
*existence* of the macro would make anyone think it's necessary to use
it -- if direct comparison is just as good, then it's confusing to
have the macro, and we should toss it).
-Karl