summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormillert <>2002-07-24 04:16:01 +0000
committermillert <>2002-07-24 04:16:01 +0000
commit0a8e0953b806aa0ac60022c94c66011f44ceaacd (patch)
tree75d6f2ad1ec3e5ec72c6fe8579d287ea2af36961
parentb6d268488e8a9312eb674665715a44b1a6c599cf (diff)
downloadopenbsd-0a8e0953b806aa0ac60022c94c66011f44ceaacd.tar.gz
openbsd-0a8e0953b806aa0ac60022c94c66011f44ceaacd.tar.bz2
openbsd-0a8e0953b806aa0ac60022c94c66011f44ceaacd.zip
Convert to ANSI function headers and make 'ch' argument int, not char.
Noticed by deraadt@
-rw-r--r--src/lib/libc/string/index.c7
-rw-r--r--src/lib/libc/string/rindex.c7
2 files changed, 6 insertions, 8 deletions
diff --git a/src/lib/libc/string/index.c b/src/lib/libc/string/index.c
index 86c4e75f12..8e4b146493 100644
--- a/src/lib/libc/string/index.c
+++ b/src/lib/libc/string/index.c
@@ -32,18 +32,17 @@
32 */ 32 */
33 33
34#if defined(LIBC_SCCS) && !defined(lint) 34#if defined(LIBC_SCCS) && !defined(lint)
35static char *rcsid = "$OpenBSD: index.c,v 1.2 1996/08/19 08:34:02 tholo Exp $"; 35static char *rcsid = "$OpenBSD: index.c,v 1.3 2002/07/24 04:16:01 millert Exp $";
36#endif /* LIBC_SCCS and not lint */ 36#endif /* LIBC_SCCS and not lint */
37 37
38#include <string.h> 38#include <string.h>
39 39
40char * 40char *
41#ifdef STRCHR 41#ifdef STRCHR
42strchr(p, ch) 42strchr(const char *p, int ch)
43#else 43#else
44index(p, ch) 44index(const char *p, int ch)
45#endif 45#endif
46 register const char *p, ch;
47{ 46{
48 for (;; ++p) { 47 for (;; ++p) {
49 if (*p == ch) 48 if (*p == ch)
diff --git a/src/lib/libc/string/rindex.c b/src/lib/libc/string/rindex.c
index f18553f667..7c7c94ae81 100644
--- a/src/lib/libc/string/rindex.c
+++ b/src/lib/libc/string/rindex.c
@@ -32,18 +32,17 @@
32 */ 32 */
33 33
34#if defined(LIBC_SCCS) && !defined(lint) 34#if defined(LIBC_SCCS) && !defined(lint)
35static char *rcsid = "$OpenBSD: rindex.c,v 1.2 1996/08/19 08:34:08 tholo Exp $"; 35static char *rcsid = "$OpenBSD: rindex.c,v 1.3 2002/07/24 04:16:01 millert Exp $";
36#endif /* LIBC_SCCS and not lint */ 36#endif /* LIBC_SCCS and not lint */
37 37
38#include <string.h> 38#include <string.h>
39 39
40char * 40char *
41#ifdef STRRCHR 41#ifdef STRRCHR
42strrchr(p, ch) 42strrchr(const char *p, int ch)
43#else 43#else
44rindex(p, ch) 44rindex(const char *p, int ch)
45#endif 45#endif
46 register const char *p, ch;
47{ 46{
48 register char *save; 47 register char *save;
49 48