X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/d9a64523371fa019c4575bb400cbbc3a50ac9903..c6bf4f310a33a9262d455ea4d3f0630b1255e3fe:/libsyscall/wrappers/string/strcmp.c diff --git a/libsyscall/wrappers/string/strcmp.c b/libsyscall/wrappers/string/strcmp.c index cfe403516..d28024703 100644 --- a/libsyscall/wrappers/string/strcmp.c +++ b/libsyscall/wrappers/string/strcmp.c @@ -39,8 +39,10 @@ __attribute__((visibility("hidden"))) int _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); }