diff options
Diffstat (limited to 'src/lib/libc/string/strcpy.c')
-rw-r--r-- | src/lib/libc/string/strcpy.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lib/libc/string/strcpy.c b/src/lib/libc/string/strcpy.c index 669bfde23e..76b063fc10 100644 --- a/src/lib/libc/string/strcpy.c +++ b/src/lib/libc/string/strcpy.c | |||
@@ -32,11 +32,14 @@ | |||
32 | */ | 32 | */ |
33 | 33 | ||
34 | #if defined(LIBC_SCCS) && !defined(lint) | 34 | #if defined(LIBC_SCCS) && !defined(lint) |
35 | /*static char *sccsid = "from: @(#)strcpy.c 5.7 (Berkeley) 2/24/91";*/ | 35 | static char *rcsid = "$OpenBSD: strcpy.c,v 1.4 1996/08/19 08:34:14 tholo Exp $"; |
36 | static char *rcsid = "$Id: strcpy.c,v 1.1.1.1 1995/10/18 08:42:22 deraadt Exp $"; | ||
37 | #endif /* LIBC_SCCS and not lint */ | 36 | #endif /* LIBC_SCCS and not lint */ |
38 | 37 | ||
38 | #ifndef _KERNEL | ||
39 | #include <string.h> | 39 | #include <string.h> |
40 | #else | ||
41 | #include <lib/libkern/libkern.h> | ||
42 | #endif | ||
40 | 43 | ||
41 | char * | 44 | char * |
42 | strcpy(to, from) | 45 | strcpy(to, from) |
@@ -45,6 +48,6 @@ strcpy(to, from) | |||
45 | { | 48 | { |
46 | char *save = to; | 49 | char *save = to; |
47 | 50 | ||
48 | for (; *to = *from; ++from, ++to); | 51 | for (; (*to = *from) != '\0'; ++from, ++to); |
49 | return(save); | 52 | return(save); |
50 | } | 53 | } |