summaryrefslogtreecommitdiff
path: root/src/lib/libc/string/strcmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libc/string/strcmp.c')
-rw-r--r--src/lib/libc/string/strcmp.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/lib/libc/string/strcmp.c b/src/lib/libc/string/strcmp.c
index ae19e2e26e..816fd111ac 100644
--- a/src/lib/libc/string/strcmp.c
+++ b/src/lib/libc/string/strcmp.c
@@ -1,3 +1,5 @@
1/* $OpenBSD: strcmp.c,v 1.7 2005/08/08 08:05:37 espie Exp $ */
2
1/*- 3/*-
2 * Copyright (c) 1990 The Regents of the University of California. 4 * Copyright (c) 1990 The Regents of the University of California.
3 * All rights reserved. 5 * All rights reserved.
@@ -13,11 +15,7 @@
13 * 2. Redistributions in binary form must reproduce the above copyright 15 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the 16 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution. 17 * documentation and/or other materials provided with the distribution.
16 * 3. All advertising materials mentioning features or use of this software 18 * 3. Neither the name of the University nor the names of its contributors
17 * must display the following acknowledgement:
18 * This product includes software developed by the University of
19 * California, Berkeley and its contributors.
20 * 4. Neither the name of the University nor the names of its contributors
21 * may be used to endorse or promote products derived from this software 19 * may be used to endorse or promote products derived from this software
22 * without specific prior written permission. 20 * without specific prior written permission.
23 * 21 *
@@ -34,19 +32,17 @@
34 * SUCH DAMAGE. 32 * SUCH DAMAGE.
35 */ 33 */
36 34
37#if defined(LIBC_SCCS) && !defined(lint) 35#if !defined(_KERNEL) && !defined(_STANDALONE)
38/*static char *sccsid = "from: @(#)strcmp.c 5.5 (Berkeley) 1/26/91";*/
39static char *rcsid = "$Id: strcmp.c,v 1.1.1.1 1995/10/18 08:42:22 deraadt Exp $";
40#endif /* LIBC_SCCS and not lint */
41
42#include <string.h> 36#include <string.h>
37#else
38#include <lib/libkern/libkern.h>
39#endif
43 40
44/* 41/*
45 * Compare strings. 42 * Compare strings.
46 */ 43 */
47int 44int
48strcmp(s1, s2) 45strcmp(const char *s1, const char *s2)
49 register const char *s1, *s2;
50{ 46{
51 while (*s1 == *s2++) 47 while (*s1 == *s2++)
52 if (*s1++ == 0) 48 if (*s1++ == 0)