static char sccsid[] = "@(#)index.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/string/index.c,v 1.5 2002/08/30 19:42:07 robert Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/string/index.c,v 1.7 2003/12/18 07:44:53 jkh Exp $");
#include <stddef.h>
#endif
(const char *p, int ch)
{
+ char c;
+
+ c = ch;
for (;; ++p) {
- if (*p == ch)
+ if (*p == c)
return ((char *)p);
if (*p == '\0')
return (NULL);