apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mihai Limbasan <mihai...@gmail.com>
Subject [PATCH] Fix assumptions about value of APR_SUCCESS being zero
Date Mon, 27 Dec 2004 14:37:23 GMT
In reply to my earlier question - went ahead and did it.

What this patch does is fix all conditionals that depend implicitely
on APR_SUCCESS being zero to perform an explicit test against its
*macro definition* and not against the numeric literal or the C
expression evaluation.

No call or return semantics and contracts are affected in any way.
Performance impact is zero since in most cases the implicit checks
generate the same code, and in the few cases where I added something a
la rv = rv ? rv : APR_SUCCESS any optimizer will happily remove the
small redundancy.

The benefit of this is future maintainability. I think I caught all
the instances that did implicit checks.

Patch is against the current HEAD (rev 123376).
Mihai Limbasan

View raw message