summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@lucent.com>1995-05-27 20:22:12 +0000
committerJim Meyering <meyering@lucent.com>1995-05-27 20:22:12 +0000
commit58581baf02c643ea5687fd01274435569f99e709 (patch)
tree1c5e886802f3fc492d9d77a152f3cb2d27042ef8
parent7cc645ed273e2f584a37657c488d6bfbcc33e0f3 (diff)
Cast RHS to const unsigned char * to avoid error from Irix-4.0.5's C compiler.
-rw-r--r--sysdeps/generic/memchr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sysdeps/generic/memchr.c b/sysdeps/generic/memchr.c
index 0eb65d12a6..01b4edcf2a 100644
--- a/sysdeps/generic/memchr.c
+++ b/sysdeps/generic/memchr.c
@@ -64,8 +64,9 @@ memchr (s, c, n)
/* Handle the first few characters by reading one character at a time.
Do this until CHAR_PTR is aligned on a longword boundary. */
- for (char_ptr = s; n > 0 && ((unsigned long int) char_ptr
- & (sizeof (longword) - 1)) != 0;
+ for (char_ptr = (const unsigned char *) s;
+ n > 0 && ((unsigned long int) char_ptr
+ & (sizeof (longword) - 1)) != 0;
--n, ++char_ptr)
if (*char_ptr == c)
return (__ptr_t) char_ptr;