summaryrefslogtreecommitdiff
path: root/sys/lib/libkern/bcmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/lib/libkern/bcmp.c')
-rw-r--r--sys/lib/libkern/bcmp.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/sys/lib/libkern/bcmp.c b/sys/lib/libkern/bcmp.c
index 21092ef1089..8096e9959f8 100644
--- a/sys/lib/libkern/bcmp.c
+++ b/sys/lib/libkern/bcmp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bcmp.c,v 1.7 2004/08/07 00:38:32 deraadt Exp $ */
+/* $OpenBSD: bcmp.c,v 1.8 2004/11/28 07:23:41 mickey Exp $ */
/*
* Copyright (c) 1987 Regents of the University of California.
@@ -30,8 +30,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)bcmp.c 5.6 (Berkeley) 2/24/91";*/
-static char *rcsid = "$OpenBSD: bcmp.c,v 1.7 2004/08/07 00:38:32 deraadt Exp $";
+static char *rcsid = "$OpenBSD: bcmp.c,v 1.8 2004/11/28 07:23:41 mickey Exp $";
#endif /* LIBC_SCCS and not lint */
#if !defined(_KERNEL) && !defined(_STANDALONE)
@@ -44,19 +43,19 @@ static char *rcsid = "$OpenBSD: bcmp.c,v 1.7 2004/08/07 00:38:32 deraadt Exp $";
* bcmp -- vax cmpc3 instruction
*/
int
-bcmp(const void *b1, const void *b2, size_t length)
+bcmp(b1, b2, length)
+ const void *b1, *b2;
+ register size_t length;
{
- const char *p1, *p2;
+ register char *p1, *p2;
if (length == 0)
return(0);
-
- p1 = (const char *)b1;
- p2 = (const char *)b2;
+ p1 = (char *)b1;
+ p2 = (char *)b2;
do
if (*p1++ != *p2++)
break;
- while (--length)
- ;
+ while (--length);
return(length);
}