Re: Help needed on #95010
On Tue, Jun 26, 2001 at 06:45:48PM +1000, Herbert Xu wrote:
> Craig Small <csmall@eye-net.com.au> wrote:
>
> > *i = strtol(m->buffer, &p, 10);
> > - if (((*i == LONG_MAX) || (*i == LONG_MIN)) && (errno == ERANGE)) {
> > + if (((*i == (int)LONG_MAX) || (*i == (int)LONG_MIN)) && (errno == ERANGE)) {
>
> This is not right. You should save the result in a real long and then
> test for errors before putting the value in *i.
Yes, of course. I was just getting the compilier to be quiet :)
- Craig
--
Craig Small VK2XLZ GnuPG:1C1B D893 1418 2AF4 45EE 95CB C76C E5AC 12CA DFA5
Eye-Net Consulting http://www.eye-net.com.au/ <csmall@eye-net.com.au>
MIEEE <csmall@ieee.org> Debian developer <csmall@debian.org>
Reply to: