Hi Florian, On Thu, Nov 30, 2023 at 01:00:30PM +0100, Florian Weimer wrote: > * Alejandro Colomar: > > > Now I realize that commit was probably wrong, and one needs to check > > both errno and the return value to determine that the call failed. Can > > you please confirm what the correct specification of strtol(3) is? > > The most detailed specification we have is the one that is in POSIX. Since POSIX doesn't specify, I assume it allows setting errno on success, as with any other libc function. That includes setting errno on a successful call that returns 0. Which means that the errno check must check for the specific errno values that actually mean an error of this function. I'll update the page. Thanks, Alex > > Thanks, > Florian > --