summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorotto <otto@openbsd.org>2005-03-30 20:13:52 +0000
committerotto <otto@openbsd.org>2005-03-30 20:13:52 +0000
commita66ee1d5f2f446e8bcc27e705781cfe47cfcfe8b (patch)
tree46498c6c87fbff4ce10ffcfa34199c65ceae8b49
parentsync (diff)
downloadwireguard-openbsd-a66ee1d5f2f446e8bcc27e705781cfe47cfcfe8b.tar.xz
wireguard-openbsd-a66ee1d5f2f446e8bcc27e705781cfe47cfcfe8b.zip
ansify + deregister. no binary change on i386. ok deraadt@ pat@ moritz@
-rw-r--r--lib/libc/string/__strsignal.c11
-rw-r--r--lib/libc/string/bcmp.c10
-rw-r--r--lib/libc/string/bcopy.c17
-rw-r--r--lib/libc/string/bm.c27
-rw-r--r--lib/libc/string/memccpy.c16
-rw-r--r--lib/libc/string/strlcat.c10
-rw-r--r--lib/libc/string/strlcpy.c10
-rw-r--r--lib/libc/string/swab.c8
8 files changed, 45 insertions, 64 deletions
diff --git a/lib/libc/string/__strsignal.c b/lib/libc/string/__strsignal.c
index 5bab3cd0af2..ebbf08d24af 100644
--- a/lib/libc/string/__strsignal.c
+++ b/lib/libc/string/__strsignal.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: __strsignal.c,v 1.8 2003/06/02 20:18:38 millert Exp $";
+static char *rcsid = "$OpenBSD: __strsignal.c,v 1.9 2005/03/30 20:13:52 otto Exp $";
#endif /* LIBC_SCCS and not lint */
#ifdef NLS
@@ -45,8 +45,7 @@ static char *rcsid = "$OpenBSD: __strsignal.c,v 1.8 2003/06/02 20:18:38 millert
#include <signal.h>
#include <string.h>
-static char *itoa(num)
- int num;
+static char *itoa(int num)
{
static char buffer[11];
char *p;
@@ -61,12 +60,10 @@ static char *itoa(num)
}
char *
-__strsignal(num, buf)
- int num;
- char *buf;
+__strsignal(int num, char *buf)
{
#define UPREFIX "Unknown signal: "
- register unsigned int signum;
+ unsigned int signum;
#ifdef NLS
nl_catd catd ;
diff --git a/lib/libc/string/bcmp.c b/lib/libc/string/bcmp.c
index 8dc8798f25c..07d32ed0438 100644
--- a/lib/libc/string/bcmp.c
+++ b/lib/libc/string/bcmp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bcmp.c,v 1.6 2004/11/28 07:16:54 mickey Exp $ */
+/* $OpenBSD: bcmp.c,v 1.7 2005/03/30 20:13:52 otto Exp $ */
/*
* Copyright (c) 1987 Regents of the University of California.
@@ -30,7 +30,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: bcmp.c,v 1.6 2004/11/28 07:16:54 mickey Exp $";
+static char *rcsid = "$OpenBSD: bcmp.c,v 1.7 2005/03/30 20:13:52 otto Exp $";
#endif /* LIBC_SCCS and not lint */
#if !defined(_KERNEL) && !defined(_STANDALONE)
@@ -43,11 +43,9 @@ static char *rcsid = "$OpenBSD: bcmp.c,v 1.6 2004/11/28 07:16:54 mickey 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 char *p1, *p2;
+ char *p1, *p2;
if (length == 0)
return(0);
diff --git a/lib/libc/string/bcopy.c b/lib/libc/string/bcopy.c
index c48faa145ef..7b30ab4abb9 100644
--- a/lib/libc/string/bcopy.c
+++ b/lib/libc/string/bcopy.c
@@ -31,7 +31,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: bcopy.c,v 1.3 2003/06/02 20:18:38 millert Exp $";
+static char *rcsid = "$OpenBSD: bcopy.c,v 1.4 2005/03/30 20:13:52 otto Exp $";
#endif /* LIBC_SCCS and not lint */
#include <string.h>
@@ -52,23 +52,20 @@ typedef long word; /* "word" used for optimal copy speed */
*/
#ifdef MEMCOPY
void *
-memcpy(dst0, src0, length)
+memcpy(void *dst0, const void *src0, size_t length)
#else
#ifdef MEMMOVE
void *
-memmove(dst0, src0, length)
+memmove(void *dst0, const void *src0, size_t length)
#else
void
-bcopy(src0, dst0, length)
+bcopy(const void *src0, void *dst0, size_t length)
#endif
#endif
- void *dst0;
- const void *src0;
- register size_t length;
{
- register char *dst = dst0;
- register const char *src = src0;
- register size_t t;
+ char *dst = dst0;
+ const char *src = src0;
+ size_t t;
if (length == 0 || dst == src) /* nothing to do */
goto done;
diff --git a/lib/libc/string/bm.c b/lib/libc/string/bm.c
index 2c7f8fac32a..6c8e4c3472a 100644
--- a/lib/libc/string/bm.c
+++ b/lib/libc/string/bm.c
@@ -31,7 +31,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: bm.c,v 1.4 2003/06/02 20:18:38 millert Exp $";
+static char *rcsid = "$OpenBSD: bm.c,v 1.5 2005/03/30 20:13:52 otto Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -85,14 +85,11 @@ static u_char const freq_def[256] = {
};
bm_pat *
-bm_comp(pb, len, freq)
- u_char const *pb;
- size_t len;
- u_char const *freq;
+bm_comp(u_char const *pb, size_t len, u_char const *freq)
{
- register u_char const *pe, *p;
- register size_t *d, r;
- register int j;
+ u_char const *pe, *p;
+ size_t *d, r;
+ int j;
int sv_errno;
bm_pat *pat;
@@ -142,8 +139,7 @@ mem: sv_errno = errno;
}
void
-bm_free(pat)
- bm_pat *pat;
+bm_free(bm_pat *pat)
{
if (pat->pat != NULL)
free(pat->pat);
@@ -153,14 +149,11 @@ bm_free(pat)
}
u_char *
-bm_exec(pat, base, n)
- bm_pat *pat;
- u_char *base;
- size_t n;
+bm_exec(bm_pat *pat, u_char *base, size_t n)
{
- register u_char *e, *ep, *p, *q, *s;
- register size_t *d0, k, md2, n1, ro;
- register int rc;
+ u_char *e, *ep, *p, *q, *s;
+ size_t *d0, k, md2, n1, ro;
+ int rc;
if (n == 0)
return (NULL);
diff --git a/lib/libc/string/memccpy.c b/lib/libc/string/memccpy.c
index 37496d1c264..265570c5a42 100644
--- a/lib/libc/string/memccpy.c
+++ b/lib/libc/string/memccpy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: memccpy.c,v 1.4 2003/06/02 20:18:38 millert Exp $ */
+/* $OpenBSD: memccpy.c,v 1.5 2005/03/30 20:13:52 otto Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -33,24 +33,20 @@
#if 0
static char sccsid[] = "@(#)memccpy.c 8.1 (Berkeley) 6/4/93";
#else
-static char *rcsid = "$OpenBSD: memccpy.c,v 1.4 2003/06/02 20:18:38 millert Exp $";
+static char *rcsid = "$OpenBSD: memccpy.c,v 1.5 2005/03/30 20:13:52 otto Exp $";
#endif
#endif /* LIBC_SCCS and not lint */
#include <string.h>
void *
-memccpy(t, f, c, n)
- void *t;
- const void *f;
- int c;
- register size_t n;
+memccpy(void *t, const void *f, int c, size_t n)
{
if (n) {
- register unsigned char *tp = t;
- register const unsigned char *fp = f;
- register unsigned char uc = c;
+ unsigned char *tp = t;
+ const unsigned char *fp = f;
+ unsigned char uc = c;
do {
if ((*tp++ = *fp++) == uc)
return (tp);
diff --git a/lib/libc/string/strlcat.c b/lib/libc/string/strlcat.c
index 2b6f1adbb4c..952eed1a794 100644
--- a/lib/libc/string/strlcat.c
+++ b/lib/libc/string/strlcat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: strlcat.c,v 1.11 2003/06/17 21:56:24 millert Exp $ */
+/* $OpenBSD: strlcat.c,v 1.12 2005/03/30 20:13:52 otto Exp $ */
/*
* Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -17,7 +17,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: strlcat.c,v 1.11 2003/06/17 21:56:24 millert Exp $";
+static char *rcsid = "$OpenBSD: strlcat.c,v 1.12 2005/03/30 20:13:52 otto Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -33,9 +33,9 @@ static char *rcsid = "$OpenBSD: strlcat.c,v 1.11 2003/06/17 21:56:24 millert Exp
size_t
strlcat(char *dst, const char *src, size_t siz)
{
- register char *d = dst;
- register const char *s = src;
- register size_t n = siz;
+ char *d = dst;
+ const char *s = src;
+ size_t n = siz;
size_t dlen;
/* Find the end of dst and adjust bytes left but don't go past end */
diff --git a/lib/libc/string/strlcpy.c b/lib/libc/string/strlcpy.c
index 82cbfac016d..09a9c2b360a 100644
--- a/lib/libc/string/strlcpy.c
+++ b/lib/libc/string/strlcpy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: strlcpy.c,v 1.8 2003/06/17 21:56:24 millert Exp $ */
+/* $OpenBSD: strlcpy.c,v 1.9 2005/03/30 20:13:52 otto Exp $ */
/*
* Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -17,7 +17,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: strlcpy.c,v 1.8 2003/06/17 21:56:24 millert Exp $";
+static char *rcsid = "$OpenBSD: strlcpy.c,v 1.9 2005/03/30 20:13:52 otto Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -31,9 +31,9 @@ static char *rcsid = "$OpenBSD: strlcpy.c,v 1.8 2003/06/17 21:56:24 millert Exp
size_t
strlcpy(char *dst, const char *src, size_t siz)
{
- register char *d = dst;
- register const char *s = src;
- register size_t n = siz;
+ char *d = dst;
+ const char *s = src;
+ size_t n = siz;
/* Copy as many bytes as will fit */
if (n != 0 && --n != 0) {
diff --git a/lib/libc/string/swab.c b/lib/libc/string/swab.c
index b928f21aa7c..0129561aa33 100644
--- a/lib/libc/string/swab.c
+++ b/lib/libc/string/swab.c
@@ -31,7 +31,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: swab.c,v 1.5 2003/06/11 21:08:16 deraadt Exp $";
+static char *rcsid = "$OpenBSD: swab.c,v 1.6 2005/03/30 20:13:52 otto Exp $";
#endif /* LIBC_SCCS and not lint */
#include <unistd.h>
@@ -39,9 +39,9 @@ static char *rcsid = "$OpenBSD: swab.c,v 1.5 2003/06/11 21:08:16 deraadt Exp $";
void
swab(const void *from, void *to, size_t len)
{
- register unsigned long temp;
- register int n;
- register char *fp, *tp;
+ unsigned long temp;
+ int n;
+ char *fp, *tp;
n = (len >> 1) + 1;
fp = (char *)from;