Re: strtol(3) setting of errno

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jakub,

On Thu, Nov 30, 2023 at 11:13:01PM +0100, Jakub Wilk wrote:
> * Alejandro Colomar <alx@xxxxxxxxxx>, 2023-11-30 13:40:
> > 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.
> 
> No? "These functions shall not change the setting of errno if successful."

Ahhh, I missed that text.  Thanks!  It means that a simple errno!=0 is
enough (plus the endptr check), then, and the current page is correct.

Cheers,
Alex

-- 
<https://www.alejandro-colomar.es/>

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux