Subject: Re: libkern's strtoul()
To: None <firstname.lastname@example.org>
From: David Laight <email@example.com>
Date: 06/04/2003 09:23:08
> Does anyone have any problem with it replacing the existing libkern
> strtoul() ?
How about a few bugs/improvements?
> if (c >= '0' && c < ('0' + min(base, 10)))
I think the min() is unnecessary, c <= '9' will do.
The 'c >= base' lower down will stop 8 being an octal digit.
> if (neg && any > 0)
> acc = -acc;
Does that DTRT for overlarge -ve numbers?
I'm not sure what the standard requires?
David Laight: firstname.lastname@example.org