RE: [AD] documenting minor return values

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


Title: RE: [AD] documenting minor return values

> I guess you would zero errno yourself before calling the function,
> then check it afterwards.  I'm pretty sure I've seen that somewhere
> before.  Very awkward, but it doesn't break anything.

I thought of that too, but I believe it is allowed for a function to
set errno even if all goes well (eg, the function retries if there is
an error, and the second try succeeds, so errno is set, but there is
success). So errno is only valid if the function returns an error,
meaning that errno is now valid. Of course, this is only a convention
and as such, we are free to not follow it. Problem is that code that
does the pack_fclose(pack_fclose_chunk(f)); would still not work. But
it would never work anyway probably...

About Annie's pack_fdopen, which is used to build chunked datafiles
without a security hole, is that considered a bugfix ? If so, I will
tell her that she should hurry up if she wants to get in into next
wip :)

Cheers

--
Vincent Penquerc'h



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