diff options
Diffstat (limited to 'lib/libc/string/strcmp.c')
-rw-r--r-- | lib/libc/string/strcmp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libc/string/strcmp.c b/lib/libc/string/strcmp.c index 95c778d..70fd22d 100644 --- a/lib/libc/string/strcmp.c +++ b/lib/libc/string/strcmp.c @@ -44,6 +44,9 @@ __FBSDID("$FreeBSD$"); int strcmp(const char *s1, const char *s2) { + if (s1 == s2) + return (0); + while (*s1 == *s2++) if (*s1++ == '\0') return (0); |