summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/vswprintf.c
diff options
context:
space:
mode:
authorhrs <hrs@FreeBSD.org>2011-05-29 02:53:52 +0000
committerhrs <hrs@FreeBSD.org>2011-05-29 02:53:52 +0000
commit8fe640108653f13042f1b15213769e338aa524f6 (patch)
tree91f5675a7c792e61d68635707501027daa3f566f /lib/libc/stdio/vswprintf.c
parent97f64b711efa9ff0011bef5d46cf9645638a38f9 (diff)
parentf3726238c8e8206eb1df4cfaf3f00947ceba3cce (diff)
downloadFreeBSD-src-8fe640108653f13042f1b15213769e338aa524f6.zip
FreeBSD-src-8fe640108653f13042f1b15213769e338aa524f6.tar.gz
Merge from head@222434.
Diffstat (limited to 'lib/libc/stdio/vswprintf.c')
-rw-r--r--lib/libc/stdio/vswprintf.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/libc/stdio/vswprintf.c b/lib/libc/stdio/vswprintf.c
index 61b8720..2cfe724 100644
--- a/lib/libc/stdio/vswprintf.c
+++ b/lib/libc/stdio/vswprintf.c
@@ -45,7 +45,7 @@ vswprintf(wchar_t * __restrict s, size_t n, const wchar_t * __restrict fmt,
{
static const mbstate_t initial;
mbstate_t mbs;
- FILE f;
+ FILE f = FAKE_FILE;
char *mbp;
int ret, sverrno;
size_t nwc;
@@ -55,7 +55,6 @@ vswprintf(wchar_t * __restrict s, size_t n, const wchar_t * __restrict fmt,
return (-1);
}
- f._file = -1;
f._flags = __SWR | __SSTR | __SALC;
f._bf._base = f._p = (unsigned char *)malloc(128);
if (f._bf._base == NULL) {
@@ -63,8 +62,6 @@ vswprintf(wchar_t * __restrict s, size_t n, const wchar_t * __restrict fmt,
return (-1);
}
f._bf._size = f._w = 127; /* Leave room for the NUL */
- f._orientation = 0;
- memset(&f._mbstate, 0, sizeof(mbstate_t));
ret = __vfwprintf(&f, fmt, ap);
if (ret < 0) {
sverrno = errno;
OpenPOWER on IntegriCloud