summaryrefslogtreecommitdiff
path: root/src/lib/libc/string/strcpy.c
diff options
context:
space:
mode:
authorniklas <>1996-03-09 02:42:58 +0000
committerniklas <>1996-03-09 02:42:58 +0000
commit83a23009542c2672b009a5ad496e0a28417a37f9 (patch)
tree129097fa3d72ad3b6b85a0a600fd1e0b703a994b /src/lib/libc/string/strcpy.c
parent543eeae2382e5de0b9518bdd9f7a75e5686fd056 (diff)
downloadopenbsd-83a23009542c2672b009a5ad496e0a28417a37f9.tar.gz
openbsd-83a23009542c2672b009a5ad496e0a28417a37f9.tar.bz2
openbsd-83a23009542c2672b009a5ad496e0a28417a37f9.zip
From NetBSD: 960217 merge
Diffstat (limited to 'src/lib/libc/string/strcpy.c')
-rw-r--r--src/lib/libc/string/strcpy.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/libc/string/strcpy.c b/src/lib/libc/string/strcpy.c
index 669bfde23e..86956cdb95 100644
--- a/src/lib/libc/string/strcpy.c
+++ b/src/lib/libc/string/strcpy.c
@@ -1,3 +1,5 @@
1/* $OpenBSD: strcpy.c,v 1.2 1996/03/09 02:42:57 niklas Exp $ */
2
1/* 3/*
2 * Copyright (c) 1988 Regents of the University of California. 4 * Copyright (c) 1988 Regents of the University of California.
3 * All rights reserved. 5 * All rights reserved.
@@ -33,7 +35,7 @@
33 35
34#if defined(LIBC_SCCS) && !defined(lint) 36#if defined(LIBC_SCCS) && !defined(lint)
35/*static char *sccsid = "from: @(#)strcpy.c 5.7 (Berkeley) 2/24/91";*/ 37/*static char *sccsid = "from: @(#)strcpy.c 5.7 (Berkeley) 2/24/91";*/
36static char *rcsid = "$Id: strcpy.c,v 1.1.1.1 1995/10/18 08:42:22 deraadt Exp $"; 38static char *rcsid = "$Id: strcpy.c,v 1.2 1996/03/09 02:42:57 niklas Exp $";
37#endif /* LIBC_SCCS and not lint */ 39#endif /* LIBC_SCCS and not lint */
38 40
39#include <string.h> 41#include <string.h>
@@ -45,6 +47,6 @@ strcpy(to, from)
45{ 47{
46 char *save = to; 48 char *save = to;
47 49
48 for (; *to = *from; ++from, ++to); 50 for (; (*to = *from) != '\0'; ++from, ++to);
49 return(save); 51 return(save);
50} 52}