]> git.saurik.com Git - apple/xnu.git/blobdiff - libsyscall/wrappers/string/index.c
xnu-6153.41.3.tar.gz
[apple/xnu.git] / libsyscall / wrappers / string / index.c
index 8c4d3e05e528258b126145f25db19cbf517c92cd..8863e815b1b52c67494ab9848c9cbf26eb484656 100644 (file)
 
 __attribute__((visibility("hidden")))
 char *
 
 __attribute__((visibility("hidden")))
 char *
-index
-(const char *p, int ch)
+_libkernel_strchr(const char *p, int ch)
 {
        char c;
 
        c = ch;
        for (;; ++p) {
 {
        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 */
 }
        }
        /* NOTREACHED */
 }