diff options
author | "Steven J. Hill" <sjhill@realitydiluted.com> | 2006-08-23 03:38:46 +0000 |
---|---|---|
committer | "Steven J. Hill" <sjhill@realitydiluted.com> | 2006-08-23 03:38:46 +0000 |
commit | ec91d8b59d5c8b314bc50cc6feedeeaf6fe3493c (patch) | |
tree | 4451a3cce162112c845dea0b838217b5fc98eb0c /libc/string/generic/strchr.c | |
parent | 3036a4319e8f59db769609c6190169b38d997093 (diff) | |
download | uClibc-alpine-ec91d8b59d5c8b314bc50cc6feedeeaf6fe3493c.tar.bz2 uClibc-alpine-ec91d8b59d5c8b314bc50cc6feedeeaf6fe3493c.tar.xz |
Merge from trunk.
Diffstat (limited to 'libc/string/generic/strchr.c')
-rw-r--r-- | libc/string/generic/strchr.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libc/string/generic/strchr.c b/libc/string/generic/strchr.c index b1ffc7538..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; @@ -182,4 +182,6 @@ char *strchr (const char *s, int c_in) return NULL; } libc_hidden_def(strchr) +#ifdef __UCLIBC_SUSV3_LEGACY__ strong_alias(strchr,index) +#endif |