News for hackers. Stuff that matters.
Re:Ratatoi is a C libary that wraps stdlib's strtol (as atoi... by kazinator on Wednesday May 21, 2025 @07:42PM (#44057384)
No ISO C standard library function sets errno to zero, but functions not in the standard library are not so obliged.

Functions that clobber errno to zero make it impossible to call several functions and use a nonzero value of errno to conclude that one or more of them went wrong.

If you don't think that such code is a good idea (for instance because you believe that every function that can fail should be checked for its specific error), then you probably have nothing against functions which clobber errno to zero.

There are no comments on this comment yet.