From b526ac59f7556902ccc7abbd6e00bcfb864cbb5f Mon Sep 17 00:00:00 2001
From: tjr <tjr@FreeBSD.org>
Date: Wed, 12 Mar 2003 06:41:49 +0000
Subject: MFp4: Make `spanp' const.

---
 lib/libc/string/wcstok.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

(limited to 'lib/libc/string/wcstok.c')

diff --git a/lib/libc/string/wcstok.c b/lib/libc/string/wcstok.c
index 5d899ee..0dbdfe0 100644
--- a/lib/libc/string/wcstok.c
+++ b/lib/libc/string/wcstok.c
@@ -45,7 +45,8 @@ wchar_t *
 wcstok(wchar_t * __restrict s, const wchar_t * __restrict delim,
     wchar_t ** __restrict last)
 {
-	wchar_t *spanp, *tok;
+	const wchar_t *spanp;
+	wchar_t *tok;
 	wchar_t c, sc;
 
 	if (s == NULL && (s = *last) == NULL)
@@ -56,7 +57,7 @@ wcstok(wchar_t * __restrict s, const wchar_t * __restrict delim,
 	 */
 cont:
 	c = *s++;
-	for (spanp = (wchar_t *)delim; (sc = *spanp++) != L'\0';) {
+	for (spanp = delim; (sc = *spanp++) != L'\0';) {
 		if (c == sc)
 			goto cont;
 	}
@@ -73,7 +74,7 @@ cont:
 	 */
 	for (;;) {
 		c = *s++;
-		spanp = (wchar_t *)delim;
+		spanp = delim;
 		do {
 			if ((sc = *spanp++) == c) {
 				if (c == L'\0')
-- 
cgit v1.1