diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-06-11 21:08:17 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-06-11 21:08:17 +0000 |
commit | 2ff2a6df1f367e97160f7c805c68b9a829b03a45 (patch) | |
tree | 280678041612d983ee3097b18e8d18d54b7b9f67 /lib/libc/string/strncpy.c | |
parent | 21ac64d7aa40363658ebcaef7506daa87f941f2c (diff) |
ansification; pval ok
Diffstat (limited to 'lib/libc/string/strncpy.c')
-rw-r--r-- | lib/libc/string/strncpy.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/libc/string/strncpy.c b/lib/libc/string/strncpy.c index 20eb7383fe1..00493f4f7f5 100644 --- a/lib/libc/string/strncpy.c +++ b/lib/libc/string/strncpy.c @@ -31,7 +31,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: strncpy.c,v 1.3 2003/06/02 20:18:38 millert Exp $"; +static char *rcsid = "$OpenBSD: strncpy.c,v 1.4 2003/06/11 21:08:16 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <string.h> @@ -41,14 +41,11 @@ static char *rcsid = "$OpenBSD: strncpy.c,v 1.3 2003/06/02 20:18:38 millert Exp * Return dst. */ char * -strncpy(dst, src, n) - char *dst; - const char *src; - register size_t n; +strncpy(char *dst, const char *src, size_t n) { if (n != 0) { - register char *d = dst; - register const char *s = src; + char *d = dst; + const char *s = src; do { if ((*d++ = *s++) == 0) { |