diff options
author | 2004-11-28 07:23:41 +0000 | |
---|---|---|
committer | 2004-11-28 07:23:41 +0000 | |
commit | f6a3c9b1fa71b1a71957242d0da17e5e1f46240e (patch) | |
tree | 923ecdd7af5dbaae56d4af536e50c2c9c2c46dba /sys/lib/libkern/strcat.c | |
parent | a tiny hppa64 bit (diff) | |
download | wireguard-openbsd-f6a3c9b1fa71b1a71957242d0da17e5e1f46240e.tar.xz wireguard-openbsd-f6a3c9b1fa71b1a71957242d0da17e5e1f46240e.zip |
sync from libc
Diffstat (limited to 'sys/lib/libkern/strcat.c')
-rw-r--r-- | sys/lib/libkern/strcat.c | 16 |
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); } |