diff options
Diffstat (limited to 'libc/string/generic/strchr.c')
-rw-r--r-- | libc/string/generic/strchr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/string/generic/strchr.c b/libc/string/generic/strchr.c index 1663adde6..8d401ec8c 100644 --- a/libc/string/generic/strchr.c +++ b/libc/string/generic/strchr.c @@ -41,8 +41,8 @@ char *strchr (const char *s, int c_in) /* 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; ((unsigned long int) char_ptr - & (sizeof (longword) - 1)) != 0; + for (char_ptr = (const unsigned char *) s; + ((unsigned long int) char_ptr & (sizeof (longword) - 1)) != 0; ++char_ptr) if (*char_ptr == c) return (void *) char_ptr; |