From 8c29d069db1898b519c6c610a91a25b5ffb8c9d0 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Mon, 1 Jan 2001 22:16:11 +0000 Subject: A bunch of updates, part from Manuel Novoa III (such as more long long support), and other updates by me (better cross platform, cross-compiler, etc, support. Now compiles with 2.0.x kernels for armnommu. --- libc/stdlib/strto_l.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libc/stdlib/strto_l.c') diff --git a/libc/stdlib/strto_l.c b/libc/stdlib/strto_l.c index a83cf4095..16b29f5d6 100644 --- a/libc/stdlib/strto_l.c +++ b/libc/stdlib/strto_l.c @@ -15,7 +15,7 @@ /* OPTIONS */ /*****************************************************************************/ -/* Set if we want strtod to set errno appropriately. */ +/* Set if we want errno set appropriately. */ /* NOTE: Implies _STRTO_ENDPTR below */ #define _STRTO_ERRNO 0 @@ -107,8 +107,8 @@ unsigned long _strto_l(const char *str, char **endptr, int base, int uflag) goto DONE; } + cutoff_digit = ULONG_MAX % base; cutoff = ULONG_MAX / base; - cutoff_digit = ULONG_MAX - cutoff * base; while (1) { digit = 40; -- cgit v1.2.3