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