From 05ebc6b11cf74e0e9e901f2e1c26d0d682c57842 Mon Sep 17 00:00:00 2001 From: deraadt <> Date: Wed, 11 Jun 2003 21:08:16 +0000 Subject: ansification; pval ok --- src/lib/libc/string/strncpy.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/lib/libc/string/strncpy.c') diff --git a/src/lib/libc/string/strncpy.c b/src/lib/libc/string/strncpy.c index 20eb7383fe..00493f4f7f 100644 --- a/src/lib/libc/string/strncpy.c +++ b/src/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 @@ -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) { -- cgit v1.2.3-55-g6feb