summaryrefslogtreecommitdiffstats
path: root/lib/libc/string/strcat.c
diff options
context:
space:
mode:
authorniklas <niklas@openbsd.org>1996-03-09 02:42:53 +0000
committerniklas <niklas@openbsd.org>1996-03-09 02:42:53 +0000
commita3320e1fbb9e87b89748f7eb5878def50449370a (patch)
tree1d3d91bee23b2c2cae6b1b5ac698e503bb851bdb /lib/libc/string/strcat.c
parentRudimentary support for compilation in a cross environment (diff)
downloadwireguard-openbsd-a3320e1fbb9e87b89748f7eb5878def50449370a.tar.xz
wireguard-openbsd-a3320e1fbb9e87b89748f7eb5878def50449370a.zip
From NetBSD: 960217 merge
Diffstat (limited to 'lib/libc/string/strcat.c')
-rw-r--r--lib/libc/string/strcat.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libc/string/strcat.c b/lib/libc/string/strcat.c
index e741b84f032..10e0aefe124 100644
--- a/lib/libc/string/strcat.c
+++ b/lib/libc/string/strcat.c
@@ -1,3 +1,5 @@
+/* $OpenBSD: strcat.c,v 1.2 1996/03/09 02:42:56 niklas Exp $ */
+
/*
* Copyright (c) 1988 Regents of the University of California.
* All rights reserved.
@@ -33,7 +35,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)strcat.c 5.6 (Berkeley) 2/24/91";*/
-static char *rcsid = "$Id: strcat.c,v 1.1.1.1 1995/10/18 08:42:22 deraadt Exp $";
+static char *rcsid = "$Id: strcat.c,v 1.2 1996/03/09 02:42:56 niklas Exp $";
#endif /* LIBC_SCCS and not lint */
#include <string.h>
@@ -46,6 +48,6 @@ strcat(s, append)
char *save = s;
for (; *s; ++s);
- while (*s++ = *append++);
+ while ((*s++ = *append++) != '\0');
return(save);
}