Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2010-10-27 23:06:10 +0400
committerJeff Johnston <jjohnstn@redhat.com>2010-10-27 23:06:10 +0400
commit9ef039777b0f9bca6ab147360d3f7e8c686bbe2b (patch)
treeeb59d67caff48c1f81d787a4e44588dff3a3f55c /newlib/libc/stdlib/strtoull_r.c
parent3e38e8abf7f6db339392b39486e6e07f5e86f17a (diff)
2010-10-27 Maurice Baijens <maurice.baijens@ellips.nl>
* libc/stdlib/strtol.c: Make sure signed characters are not sign-extended when converted to int and passed to ctype macros. * libc/stdlib/strtoul.c: Ditto. * libc/stdlib/strtoll_r.c: Ditto. * libc/stdlib/strtoull_r.c: Ditto.
Diffstat (limited to 'newlib/libc/stdlib/strtoull_r.c')
-rw-r--r--newlib/libc/stdlib/strtoull_r.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/newlib/libc/stdlib/strtoull_r.c b/newlib/libc/stdlib/strtoull_r.c
index d8a86b3f4..da7f7f51a 100644
--- a/newlib/libc/stdlib/strtoull_r.c
+++ b/newlib/libc/stdlib/strtoull_r.c
@@ -63,7 +63,7 @@ _DEFUN (_strtoull_r, (rptr, nptr, endptr, base),
char **endptr _AND
int base)
{
- register const char *s = nptr;
+ register const unsigned char *s = (const unsigned char *)nptr;
register unsigned long long acc;
register int c;
register unsigned long long cutoff;
@@ -113,7 +113,7 @@ _DEFUN (_strtoull_r, (rptr, nptr, endptr, base),
} else if (neg)
acc = -acc;
if (endptr != 0)
- *endptr = (char *) (any ? s - 1 : nptr);
+ *endptr = (char *) (any ? (char *)s - 1 : nptr);
return (acc);
}