2 ms·
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
by kazinator 1y ago
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.