summaryrefslogtreecommitdiffstats
path: root/sys/lib/libkern/bcmp.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2004-08-07 00:38:32 +0000
committerderaadt <deraadt@openbsd.org>2004-08-07 00:38:32 +0000
commita26aa41994e8a6961f009870b31f84fec938f9c8 (patch)
treeb69a5bc2e1eeaca538d3783d02cfd53f88cb19db /sys/lib/libkern/bcmp.c
parentsync (diff)
downloadwireguard-openbsd-a26aa41994e8a6961f009870b31f84fec938f9c8.tar.xz
wireguard-openbsd-a26aa41994e8a6961f009870b31f84fec938f9c8.zip
ansi and some missing protos
Diffstat (limited to 'sys/lib/libkern/bcmp.c')
-rw-r--r--sys/lib/libkern/bcmp.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/lib/libkern/bcmp.c b/sys/lib/libkern/bcmp.c
index 0714010ec0d..21092ef1089 100644
--- a/sys/lib/libkern/bcmp.c
+++ b/sys/lib/libkern/bcmp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bcmp.c,v 1.6 2003/06/02 23:28:08 millert Exp $ */
+/* $OpenBSD: bcmp.c,v 1.7 2004/08/07 00:38:32 deraadt Exp $ */
/*
* Copyright (c) 1987 Regents of the University of California.
@@ -31,7 +31,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.6 2003/06/02 23:28:08 millert Exp $";
+static char *rcsid = "$OpenBSD: bcmp.c,v 1.7 2004/08/07 00:38:32 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#if !defined(_KERNEL) && !defined(_STANDALONE)
@@ -44,19 +44,19 @@ static char *rcsid = "$OpenBSD: bcmp.c,v 1.6 2003/06/02 23:28:08 millert Exp $";
* bcmp -- vax cmpc3 instruction
*/
int
-bcmp(b1, b2, length)
- const void *b1, *b2;
- register size_t length;
+bcmp(const void *b1, const void *b2, size_t length)
{
- register const char *p1, *p2;
+ const char *p1, *p2;
if (length == 0)
return(0);
+
p1 = (const char *)b1;
p2 = (const char *)b2;
do
if (*p1++ != *p2++)
break;
- while (--length);
+ while (--length)
+ ;
return(length);
}