Implementation errors in strtol()

Andrey Chernov ache at nagual.pp.ru
Sun Jan 23 13:17:07 PST 2005


On Sun, Jan 23, 2005 at 04:30:24PM +0200, Giorgos Keramidas wrote:
> Why would checking for explicit errno values be necessary?  IIRC, after
> a few emails I had exchanged with Dima Dorfman a few months ago,
> checking for endptr *and* errno != 0 was ok.

_Portable_ application must suppose that not all OSes are POSIX 
conformant, so it can't be sure what errno comes from strtol(), it is why 
explicit checking for known value is needed.

-- 
http://ache.pp.ru/


More information about the freebsd-current mailing list