summaryrefslogtreecommitdiffstats
path: root/lib/libc/string/strcpy.c
diff options
context:
space:
mode:
authorniklas <niklas@openbsd.org>1996-03-09 02:42:53 +0000
committerniklas <niklas@openbsd.org>1996-03-09 02:42:53 +0000
commita3320e1fbb9e87b89748f7eb5878def50449370a (patch)
tree1d3d91bee23b2c2cae6b1b5ac698e503bb851bdb /lib/libc/string/strcpy.c
parentRudimentary support for compilation in a cross environment (diff)
downloadwireguard-openbsd-a3320e1fbb9e87b89748f7eb5878def50449370a.tar.xz
wireguard-openbsd-a3320e1fbb9e87b89748f7eb5878def50449370a.zip
From NetBSD: 960217 merge
Diffstat (limited to 'lib/libc/string/strcpy.c')
-rw-r--r--lib/libc/string/strcpy.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libc/string/strcpy.c b/lib/libc/string/strcpy.c
index 669bfde23ec..86956cdb957 100644
--- a/lib/libc/string/strcpy.c
+++ b/lib/libc/string/strcpy.c
@@ -1,3 +1,5 @@
+/* $OpenBSD: strcpy.c,v 1.2 1996/03/09 02:42:57 niklas Exp $ */
+
/*
* Copyright (c) 1988 Regents of the University of California.
* All rights reserved.
@@ -33,7 +35,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)strcpy.c 5.7 (Berkeley) 2/24/91";*/
-static char *rcsid = "$Id: strcpy.c,v 1.1.1.1 1995/10/18 08:42:22 deraadt Exp $";
+static char *rcsid = "$Id: strcpy.c,v 1.2 1996/03/09 02:42:57 niklas Exp $";
#endif /* LIBC_SCCS and not lint */
#include <string.h>
@@ -45,6 +47,6 @@ strcpy(to, from)
{
char *save = to;
- for (; *to = *from; ++from, ++to);
+ for (; (*to = *from) != '\0'; ++from, ++to);
return(save);
}