summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2002-07-24 04:16:02 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2002-07-24 04:16:02 +0000
commit52470d6c0412ba1bc9214cf397fabe12efb88e70 (patch)
tree6f3b2ac98d156b708a5ec531dc1623c8d2174e6f
parente1bcdfbc7e9710d995bc014ec08f319db51cd8e6 (diff)
Convert to ANSI function headers and make 'ch' argument int, not char.
Noticed by deraadt@
-rw-r--r--lib/libc/string/index.c7
-rw-r--r--lib/libc/string/rindex.c7
2 files changed, 6 insertions, 8 deletions
diff --git a/lib/libc/string/index.c b/lib/libc/string/index.c
index 86c4e75f122..8e4b1464933 100644
--- a/lib/libc/string/index.c
+++ b/lib/libc/string/index.c
@@ -32,18 +32,17 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: index.c,v 1.2 1996/08/19 08:34:02 tholo Exp $";
+static char *rcsid = "$OpenBSD: index.c,v 1.3 2002/07/24 04:16:01 millert Exp $";
#endif /* LIBC_SCCS and not lint */
#include <string.h>
char *
#ifdef STRCHR
-strchr(p, ch)
+strchr(const char *p, int ch)
#else
-index(p, ch)
+index(const char *p, int ch)
#endif
- register const char *p, ch;
{
for (;; ++p) {
if (*p == ch)
diff --git a/lib/libc/string/rindex.c b/lib/libc/string/rindex.c
index f18553f6676..7c7c94ae815 100644
--- a/lib/libc/string/rindex.c
+++ b/lib/libc/string/rindex.c
@@ -32,18 +32,17 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: rindex.c,v 1.2 1996/08/19 08:34:08 tholo Exp $";
+static char *rcsid = "$OpenBSD: rindex.c,v 1.3 2002/07/24 04:16:01 millert Exp $";
#endif /* LIBC_SCCS and not lint */
#include <string.h>
char *
#ifdef STRRCHR
-strrchr(p, ch)
+strrchr(const char *p, int ch)
#else
-rindex(p, ch)
+rindex(const char *p, int ch)
#endif
- register const char *p, ch;
{
register char *save;