From f400c2b850571598625a586cc60aa8d0364941bf Mon Sep 17 00:00:00 2001 From: Roman Divacky Date: Thu, 15 Jan 2009 20:45:59 +0000 Subject: [PATCH] Change dstp to be const and remove bogus cast. Submitted by: christoph.mallon at gmx.de Approved by: kib (mentor) --- lib/libc/locale/wcsftime.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/libc/locale/wcsftime.c b/lib/libc/locale/wcsftime.c index 22eb389e64ad..a546dc646a60 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;