summaryrefslogtreecommitdiffstats
path: root/sys/lib/libkern/strcat.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/lib/libkern/strcat.c')
-rw-r--r--sys/lib/libkern/strcat.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/lib/libkern/strcat.c b/sys/lib/libkern/strcat.c
index 88cfad0cfb7..7d058e9e68f 100644
--- a/sys/lib/libkern/strcat.c
+++ b/sys/lib/libkern/strcat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: strcat.c,v 1.8 2004/08/07 00:38:33 deraadt Exp $ */
+/* $OpenBSD: strcat.c,v 1.9 2004/11/28 07:23:41 mickey Exp $ */
/*
* Copyright (c) 1988 Regents of the University of California.
@@ -30,8 +30,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)strcat.c 5.6 (Berkeley) 2/24/91";*/
-static char *rcsid = "$OpenBSD: strcat.c,v 1.8 2004/08/07 00:38:33 deraadt Exp $";
+static char *rcsid = "$OpenBSD: strcat.c,v 1.9 2004/11/28 07:23:41 mickey Exp $";
#endif /* LIBC_SCCS and not lint */
#if !defined(_KERNEL) && !defined(_STANDALONE)
@@ -40,16 +39,17 @@ static char *rcsid = "$OpenBSD: strcat.c,v 1.8 2004/08/07 00:38:33 deraadt Exp $
#include <lib/libkern/libkern.h>
#endif
-__warn_references(strcat, "warning: strcat() is often misused, please use strlcpy()");
+#if defined(APIWARN)
+__warn_references(strcat,
+ "warning: strcat() is almost always misused, please use strlcat()");
+#endif
char *
strcat(char *s, const char *append)
{
char *save = s;
- for (; *s; ++s)
- ;
- while ((*s++ = *append++) != '\0')
- ;
+ for (; *s; ++s);
+ while ((*s++ = *append++) != '\0');
return(save);
}