Andre Noll [Sat, 31 May 2008 17:18:31 +0000 (19:18 +0200)]
Fix a design flaw in osl_rbtree_loop() and osl_rbtree_loop_reverse().
In case the loop was terminated because the user-supplied loop function
returned a negative value, the old code returned this value back to
the caller of osl_rbtree_loop(). This is bad because osl functions
should only return osl error codes.
Moreover, the return value of the loop function might coincide with an
osl error code making it impossible to distinguish between the two
errors.
The fix is to introduce a new osl error code E_OSL_LOOP which is returned
by osl_rbtree_loop() in case the loop function returned a negative value.
It's up to the caller to save any further information about the error
in the private_data struct.
Andre Noll [Mon, 26 May 2008 20:51:43 +0000 (22:51 +0200)]
Get rid of string.c and string.h.
These function contained only the malloc wrappers which exited on
allocation failures which is not an acceptable behaviour for a
library. We must therefore bite the bullet and check the return
values in the callers.