diff options
Diffstat (limited to 'sys/lib/libkern/strcpy.c')
-rw-r--r-- | sys/lib/libkern/strcpy.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/lib/libkern/strcpy.c b/sys/lib/libkern/strcpy.c index 7c42dcf5801..d08b319e67b 100644 --- a/sys/lib/libkern/strcpy.c +++ b/sys/lib/libkern/strcpy.c @@ -1,3 +1,5 @@ +/* $OpenBSD: strcpy.c,v 1.2 1996/04/19 16:09:39 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 1995/10/18 08:52:50 deraadt Exp $"; +static char *rcsid = "$OpenBSD: strcpy.c,v 1.2 1996/04/19 16:09:39 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); } |