summaryrefslogtreecommitdiff
path: root/lib/libc/string/strcat.c
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1996-03-09 02:43:02 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1996-03-09 02:43:02 +0000
commitc3996ffb0dc7db615b0d7bb4a7bc9fc0c187177b (patch)
tree8e4fc4b3efec6da143824896decaa98171777b34 /lib/libc/string/strcat.c
parent81fdb1c9d870ea7675764665befe8112a17eaa0a (diff)
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 6ca13f23219..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 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);
}