summaryrefslogtreecommitdiff
path: root/libc/string/strncmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/string/strncmp.c')
-rw-r--r--libc/string/strncmp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/string/strncmp.c b/libc/string/strncmp.c
index 84a2bd512..59e4a2c22 100644
--- a/libc/string/strncmp.c
+++ b/libc/string/strncmp.c
@@ -25,7 +25,7 @@ int Wstrncmp(register const Wchar *s1, register const Wchar *s2, size_t n)
--n;
}
- return (n == 0) ? 0 : ((*((Wuchar *)s1) < *((Wuchar *)s2)) ? -1 : 1);
+ return (n == 0) ? 0 : (*((Wuchar *)s1) - *((Wuchar *)s2));
#else
int r = 0;