diff options
Diffstat (limited to 'lib/libc/string/strcmp.c')
-rw-r--r-- | lib/libc/string/strcmp.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libc/string/strcmp.c b/lib/libc/string/strcmp.c index ab95333..95c778d 100644 --- a/lib/libc/string/strcmp.c +++ b/lib/libc/string/strcmp.c @@ -42,11 +42,10 @@ __FBSDID("$FreeBSD$"); * Compare strings. */ int -strcmp(s1, s2) - const char *s1, *s2; +strcmp(const char *s1, const char *s2) { while (*s1 == *s2++) - if (*s1++ == 0) + if (*s1++ == '\0') return (0); return (*(const unsigned char *)s1 - *(const unsigned char *)(s2 - 1)); } |