summaryrefslogtreecommitdiff
path: root/sys/lib/libkern/strcmp.c
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2004-11-28 07:23:42 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2004-11-28 07:23:42 +0000
commit9bd24be8e0a2e9abc43eaa237cf2e27c5464e716 (patch)
tree89366a36a6a5c8923d0a6e790b85676f8e585a52 /sys/lib/libkern/strcmp.c
parent69611256b74018387f3e3355f9e7f5b670087451 (diff)
sync from libc
Diffstat (limited to 'sys/lib/libkern/strcmp.c')
-rw-r--r--sys/lib/libkern/strcmp.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/lib/libkern/strcmp.c b/sys/lib/libkern/strcmp.c
index c38e2e55301..f9973e18720 100644
--- a/sys/lib/libkern/strcmp.c
+++ b/sys/lib/libkern/strcmp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: strcmp.c,v 1.8 2004/08/07 00:38:33 deraadt Exp $ */
+/* $OpenBSD: strcmp.c,v 1.9 2004/11/28 07:23:41 mickey Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -33,11 +33,9 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)strcmp.c 5.5 (Berkeley) 1/26/91";*/
-static char *rcsid = "$OpenBSD: strcmp.c,v 1.8 2004/08/07 00:38:33 deraadt Exp $";
+static char *rcsid = "$OpenBSD: strcmp.c,v 1.9 2004/11/28 07:23:41 mickey Exp $";
#endif /* LIBC_SCCS and not lint */
-#include <sys/types.h>
#if !defined(_KERNEL) && !defined(_STANDALONE)
#include <string.h>
#else
@@ -49,10 +47,9 @@ static char *rcsid = "$OpenBSD: strcmp.c,v 1.8 2004/08/07 00:38:33 deraadt Exp $
*/
int
strcmp(const char *s1, const char *s2)
-
{
while (*s1 == *s2++)
if (*s1++ == 0)
return (0);
- return (*(const u_char *)s1 - *(const u_char *)--s2);
+ return (*(unsigned char *)s1 - *(unsigned char *)--s2);
}