aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim J. Robbins <tjr@FreeBSD.org>2003-03-12 06:41:49 +0000
committerTim J. Robbins <tjr@FreeBSD.org>2003-03-12 06:41:49 +0000
commit07648c8bb83d821bd604f4b04479792b3ce31c46 (patch)
tree2282fed9335428b708c86ace78a2c130cd2414fb
parent9adc8e4d7589e139697e00f34149e3e3f9b73ef5 (diff)
downloadsrc-07648c8bb83d821bd604f4b04479792b3ce31c46.tar.gz
src-07648c8bb83d821bd604f4b04479792b3ce31c46.zip
MFp4: Make `spanp' const.
Notes
Notes: svn path=/head/; revision=112131
-rw-r--r--lib/libc/string/wcstok.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libc/string/wcstok.c b/lib/libc/string/wcstok.c
index 5d899ee94bb1..0dbdfe0e2836 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')