diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libc/string/strcat.c | 11 | ||||
-rw-r--r-- | src/lib/libc/string/strcpy.c | 11 |
2 files changed, 14 insertions, 8 deletions
diff --git a/src/lib/libc/string/strcat.c b/src/lib/libc/string/strcat.c index 05a517a38b..885822bae3 100644 --- a/src/lib/libc/string/strcat.c +++ b/src/lib/libc/string/strcat.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: strcat.c,v 1.5 2003/06/02 20:18:38 millert Exp $"; | 31 | static char *rcsid = "$OpenBSD: strcat.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: strcat.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(strcat, | ||
42 | "warning: strcat() is almost always misused, please use strlcat()"); | ||
43 | #endif | ||
44 | |||
40 | char * | 45 | char * |
41 | strcat(s, append) | 46 | strcat(char *s, const char *append) |
42 | register char *s; | ||
43 | register const char *append; | ||
44 | { | 47 | { |
45 | char *save = s; | 48 | char *save = s; |
46 | 49 | ||
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 | ||