diff options
Diffstat (limited to 'src/lib/libc/string/strcpy.c')
| -rw-r--r-- | src/lib/libc/string/strcpy.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/lib/libc/string/strcpy.c b/src/lib/libc/string/strcpy.c index 229d6d03bd..e5c3d7dcbe 100644 --- a/src/lib/libc/string/strcpy.c +++ b/src/lib/libc/string/strcpy.c | |||
| @@ -28,7 +28,7 @@ | |||
| 28 | */ | 28 | */ |
| 29 | 29 | ||
| 30 | #if defined(LIBC_SCCS) && !defined(lint) | 30 | #if defined(LIBC_SCCS) && !defined(lint) |
| 31 | static char *rcsid = "$OpenBSD: strcpy.c,v 1.5 2003/06/02 20:18:38 millert Exp $"; | 31 | static char *rcsid = "$OpenBSD: strcpy.c,v 1.6 2003/07/24 01:15:42 deraadt Exp $"; |
| 32 | #endif /* LIBC_SCCS and not lint */ | 32 | #endif /* LIBC_SCCS and not lint */ |
| 33 | 33 | ||
| 34 | #ifndef _KERNEL | 34 | #ifndef _KERNEL |
| @@ -37,10 +37,13 @@ static char *rcsid = "$OpenBSD: strcpy.c,v 1.5 2003/06/02 20:18:38 millert Exp $ | |||
| 37 | #include <lib/libkern/libkern.h> | 37 | #include <lib/libkern/libkern.h> |
| 38 | #endif | 38 | #endif |
| 39 | 39 | ||
| 40 | #if defined(APIWARN) | ||
| 41 | __warn_references(strcpy, | ||
| 42 | "warning: strcpy() is almost always misused, please use strlcpy()"); | ||
| 43 | #endif | ||
| 44 | |||
| 40 | char * | 45 | char * |
| 41 | strcpy(to, from) | 46 | strcpy(char *to, const char *from) |
| 42 | register char *to; | ||
| 43 | register const char *from; | ||
| 44 | { | 47 | { |
| 45 | char *save = to; | 48 | char *save = to; |
| 46 | 49 | ||
