summaryrefslogtreecommitdiffstats
path: root/lib/libc/string
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/string')
-rw-r--r--lib/libc/string/bcmp.c5
-rw-r--r--lib/libc/string/bm.c10
-rw-r--r--lib/libc/string/strcat.c6
-rw-r--r--lib/libc/string/strcpy.c6
-rw-r--r--lib/libc/string/strftime.c10
5 files changed, 24 insertions, 13 deletions
diff --git a/lib/libc/string/bcmp.c b/lib/libc/string/bcmp.c
index 2cc38baee36..edd83c2686d 100644
--- a/lib/libc/string/bcmp.c
+++ b/lib/libc/string/bcmp.c
@@ -1,3 +1,5 @@
+/* $OpenBSD: bcmp.c,v 1.2 1996/03/09 02:42:54 niklas Exp $ */
+
/*
* Copyright (c) 1987 Regents of the University of California.
* All rights reserved.
@@ -33,7 +35,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)bcmp.c 5.6 (Berkeley) 2/24/91";*/
-static char *rcsid = "$Id: bcmp.c,v 1.1.1.1 1995/10/18 08:42:20 deraadt Exp $";
+static char *rcsid = "$Id: bcmp.c,v 1.2 1996/03/09 02:42:54 niklas Exp $";
#endif /* LIBC_SCCS and not lint */
#include <string.h>
@@ -41,6 +43,7 @@ static char *rcsid = "$Id: bcmp.c,v 1.1.1.1 1995/10/18 08:42:20 deraadt Exp $";
/*
* bcmp -- vax cmpc3 instruction
*/
+int
bcmp(b1, b2, length)
const void *b1, *b2;
register size_t length;
diff --git a/lib/libc/string/bm.c b/lib/libc/string/bm.c
index 68eac22ecc1..4bc5f178014 100644
--- a/lib/libc/string/bm.c
+++ b/lib/libc/string/bm.c
@@ -1,3 +1,5 @@
+/* $OpenBSD: bm.c,v 1.2 1996/03/09 02:42:55 niklas Exp $ */
+
/*-
* Copyright (c) 1994
* The Regents of the University of California. All rights reserved.
@@ -34,10 +36,10 @@
* SUCH DAMAGE.
*/
-#ifndef lint
-/* from: static char sccsid[] = "@(#)bm.c 8.7 (Berkeley) 6/21/94"; */
-static char *rcsid = "$Id: bm.c,v 1.1.1.1 1995/10/18 08:42:20 deraadt Exp $";
-#endif /* not lint */
+#if defined(LIBC_SCCS) && !defined(lint)
+/* from: static char sccsid[] = "@(#)bm.c 8.7 (Berkeley) 6/21/94"; */
+static char *rcsid = "$Id: bm.c,v 1.2 1996/03/09 02:42:55 niklas Exp $";
+#endif /* LIBC_SCCS && not lint */
#include <sys/types.h>
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);
}
diff --git a/lib/libc/string/strcpy.c b/lib/libc/string/strcpy.c
index 669bfde23ec..86956cdb957 100644
--- a/lib/libc/string/strcpy.c
+++ b/lib/libc/string/strcpy.c
@@ -1,3 +1,5 @@
+/* $OpenBSD: strcpy.c,v 1.2 1996/03/09 02:42:57 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: @(#)strcpy.c 5.7 (Berkeley) 2/24/91";*/
-static char *rcsid = "$Id: strcpy.c,v 1.1.1.1 1995/10/18 08:42:22 deraadt Exp $";
+static char *rcsid = "$Id: strcpy.c,v 1.2 1996/03/09 02:42:57 niklas Exp $";
#endif /* LIBC_SCCS and not lint */
#include <string.h>
@@ -45,6 +47,6 @@ strcpy(to, from)
{
char *save = to;
- for (; *to = *from; ++from, ++to);
+ for (; (*to = *from) != '\0'; ++from, ++to);
return(save);
}
diff --git a/lib/libc/string/strftime.c b/lib/libc/string/strftime.c
index b696a60e558..0b69e10ac05 100644
--- a/lib/libc/string/strftime.c
+++ b/lib/libc/string/strftime.c
@@ -1,3 +1,5 @@
+/* $OpenBSD: strftime.c,v 1.3 1996/03/09 02:42:58 niklas Exp $ */
+
/*
* Copyright (c) 1989 The Regents of the University of California.
* All rights reserved.
@@ -33,7 +35,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)strftime.c 5.11 (Berkeley) 2/24/91";*/
-static char *rcsid = "$Id: strftime.c,v 1.2 1995/12/30 08:16:41 deraadt Exp $";
+static char *rcsid = "$Id: strftime.c,v 1.3 1996/03/09 02:42:58 niklas Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/localedef.h>
@@ -272,7 +274,7 @@ _fmt(format, t)
return(gsize);
}
-static
+static int
_secs(t)
struct tm *t;
{
@@ -289,7 +291,7 @@ _secs(t)
return(_add(++p));
}
-static
+static int
_conv(n, digits, pad)
int n, digits;
char pad;
@@ -304,7 +306,7 @@ _conv(n, digits, pad)
return(_add(++p));
}
-static
+static int
_add(str)
register char *str;
{