[AD] errno cleanup patch

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


The attached patch cleans up the use of errno/allegro_errno throughout the
library:
- corrects several tests where *allegro_errno was used as the failure flag
for only one function call; in this situation, the return value of the
function must be used,
- in circumstances for which such a test is unavoidable (because of many
function calls), properly initializes *allegro_errno to 0,
- removes some useless *allegro_errno = 0 lines (a function shouldn't do
that if it doesn't need to test *allegro_errno afterwards),
- eliminates all direct returns of the value *allegro_errno by a function;
the standard return values are 0 (success) and -1 (failure) for Allegro.

--
Eric Botcazou

Attachment: errno.zip
Description: Zip compressed data



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/