libc: use __bos instead of __bos0 for strchr.

I dunno why I used __bos0 in the first place; clang's strrchr (and
GCC's strchr+strrchr) both use __bos.

Bug: 34747525
Test: m. Device still boots. cts -m BionicUnitTests shows no new
failures.
Change-Id: Ifec0e05a6a1144fa3e3ac70562af3ec57c09c194
This commit is contained in:
George Burgess IV 2017-04-03 18:03:36 -07:00
parent 4df5ca1e02
commit bce9a7d518

View file

@ -358,9 +358,9 @@ size_t strlen(const char* const _Nonnull s __pass_object_size0)
#if __ANDROID_API__ >= __ANDROID_API_J_MR2__
__BIONIC_FORTIFY_INLINE
char* strchr(const char* const _Nonnull s __pass_object_size0, int c)
char* strchr(const char* const _Nonnull s __pass_object_size, int c)
__overloadable {
size_t bos = __bos0(s);
size_t bos = __bos(s);
if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) {
return __builtin_strchr(s, c);