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
no-assume-zero-apr_success.diff
Description: Binary data