X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/39236c6e673c41db228275375ab7fdb0f837b292..c6bf4f310a33a9262d455ea4d3f0630b1255e3fe:/libsyscall/wrappers/string/strcmp.c diff --git a/libsyscall/wrappers/string/strcmp.c b/libsyscall/wrappers/string/strcmp.c index cffe07883..d28024703 100644 --- a/libsyscall/wrappers/string/strcmp.c +++ b/libsyscall/wrappers/string/strcmp.c @@ -37,10 +37,12 @@ */ __attribute__((visibility("hidden"))) int -strcmp(const char *s1, const char *s2) +_libkernel_strcmp(const char *s1, const char *s2) { - while (*s1 == *s2++) - if (*s1++ == '\0') - return (0); - return (*(const unsigned char *)s1 - *(const unsigned char *)(s2 - 1)); + while (*s1 == *s2++) { + if (*s1++ == '\0') { + return 0; + } + } + return *(const unsigned char *)s1 - *(const unsigned char *)(s2 - 1); }