summaryrefslogtreecommitdiffstats
path: root/lib/libc/string/index.c
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2002-07-24 04:16:01 +0000
committermillert <millert@openbsd.org>2002-07-24 04:16:01 +0000
commitcab33baaeac7f7231df425b2708f2bb3d227e994 (patch)
tree284d10a55038165298dbf738314c0280dfeaf676 /lib/libc/string/index.c
parentuse real clones of the libc functions (diff)
downloadwireguard-openbsd-cab33baaeac7f7231df425b2708f2bb3d227e994.tar.xz
wireguard-openbsd-cab33baaeac7f7231df425b2708f2bb3d227e994.zip
Convert to ANSI function headers and make 'ch' argument int, not char.
Noticed by deraadt@
Diffstat (limited to 'lib/libc/string/index.c')
-rw-r--r--lib/libc/string/index.c7
1 files changed, 3 insertions, 4 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)