Date: Thu, 15 Jan 2009 20:45:59 +0000 (UTC) From: Roman Divacky <rdivacky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r187312 - head/lib/libc/locale Message-ID: <200901152045.n0FKjx0I086984@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rdivacky Date: Thu Jan 15 20:45:59 2009 New Revision: 187312 URL: http://svn.freebsd.org/changeset/base/187312 Log: Change dstp to be const and remove bogus cast. Submitted by: christoph.mallon at gmx.de Approved by: kib (mentor) Modified: head/lib/libc/locale/wcsftime.c Modified: head/lib/libc/locale/wcsftime.c ============================================================================== --- head/lib/libc/locale/wcsftime.c Thu Jan 15 20:30:38 2009 (r187311) +++ head/lib/libc/locale/wcsftime.c Thu Jan 15 20:45:59 2009 (r187312) @@ -52,7 +52,8 @@ wcsftime(wchar_t * __restrict wcs, size_ { 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_ 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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901152045.n0FKjx0I086984>