summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2009-01-15 20:45:59 +0000
committerrdivacky <rdivacky@FreeBSD.org>2009-01-15 20:45:59 +0000
commit5a043c094afa91f53ddd0e16b450d26d855cf133 (patch)
treea63ede0d42da20cb11bd60ce59efd7067d3e4453 /lib
parent30335a2835b1cf67e8ae777064ff1c0f98b0c5f0 (diff)
downloadFreeBSD-src-5a043c094afa91f53ddd0e16b450d26d855cf133.zip
FreeBSD-src-5a043c094afa91f53ddd0e16b450d26d855cf133.tar.gz
Change dstp to be const and remove bogus cast.
Submitted by: christoph.mallon at gmx.de Approved by: kib (mentor)
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/locale/wcsftime.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libc/locale/wcsftime.c b/lib/libc/locale/wcsftime.c
index 22eb389..a546dc6 100644
--- a/lib/libc/locale/wcsftime.c
+++ b/lib/libc/locale/wcsftime.c
@@ -52,7 +52,8 @@ wcsftime(wchar_t * __restrict wcs, size_t maxsize,
{
static const mbstate_t initial;
mbstate_t mbs;
- char *dst, *dstp, *sformat;
+ char *dst, *sformat;
+ const char *dstp;
const wchar_t *formatp;
size_t n, sflen;
int sverrno;
@@ -90,7 +91,7 @@ wcsftime(wchar_t * __restrict wcs, size_t maxsize,
goto error;
dstp = dst;
mbs = initial;
- n = mbsrtowcs(wcs, (const char **)&dstp, maxsize, &mbs);
+ n = mbsrtowcs(wcs, &dstp, maxsize, &mbs);
if (n == (size_t)-2 || n == (size_t)-1 || dstp != NULL)
goto error;
OpenPOWER on IntegriCloud