X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/39236c6e673c41db228275375ab7fdb0f837b292..94ff46dc2849db4d43eaaf144872decc522aafb4:/libsyscall/wrappers/string/index.c diff --git a/libsyscall/wrappers/string/index.c b/libsyscall/wrappers/string/index.c index 8c4d3e05e..8863e815b 100644 --- a/libsyscall/wrappers/string/index.c +++ b/libsyscall/wrappers/string/index.c @@ -31,17 +31,18 @@ __attribute__((visibility("hidden"))) char * -index -(const char *p, int ch) +_libkernel_strchr(const char *p, int ch) { char c; c = ch; for (;; ++p) { - if (*p == c) - return ((char *)p); - if (*p == '\0') - return (NULL); + if (*p == c) { + return (char *)p; + } + if (*p == '\0') { + return NULL; + } } /* NOTREACHED */ }