diff options
author | tjr <tjr@FreeBSD.org> | 2003-03-12 06:41:49 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2003-03-12 06:41:49 +0000 |
commit | b526ac59f7556902ccc7abbd6e00bcfb864cbb5f (patch) | |
tree | 2282fed9335428b708c86ace78a2c130cd2414fb /lib/libc/string | |
parent | 69e554e17fe54b7ef98d2ef9f4f872ff1239ddcb (diff) | |
download | FreeBSD-src-b526ac59f7556902ccc7abbd6e00bcfb864cbb5f.zip FreeBSD-src-b526ac59f7556902ccc7abbd6e00bcfb864cbb5f.tar.gz |
MFp4: Make `spanp' const.
Diffstat (limited to 'lib/libc/string')
-rw-r--r-- | lib/libc/string/wcstok.c | 7 |
1 files changed, 4 insertions, 3 deletions
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') |