summaryrefslogtreecommitdiff
path: root/lib/libc/stdio/asprintf.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2008-04-17 22:17:54 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2008-04-17 22:17:54 +0000
commit1e98f88776fc606df245a382685b1ac634a81389 (patch)
treeb259dd878c8cb0ee9fb15608aebb9453ad10e7b1 /lib/libc/stdio/asprintf.c
parentaba7c5b84b764f7dcb96c651735aa1bb10348d34 (diff)
Notes
Diffstat (limited to 'lib/libc/stdio/asprintf.c')
-rw-r--r--lib/libc/stdio/asprintf.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libc/stdio/asprintf.c b/lib/libc/stdio/asprintf.c
index f14265179589..ed8698926f43 100644
--- a/lib/libc/stdio/asprintf.c
+++ b/lib/libc/stdio/asprintf.c
@@ -43,7 +43,6 @@ asprintf(char **str, char const *fmt, ...)
int ret;
va_list ap;
FILE f;
- struct __sFILEX ext;
f._file = -1;
f._flags = __SWR | __SSTR | __SALC;
@@ -54,8 +53,8 @@ asprintf(char **str, char const *fmt, ...)
return (-1);
}
f._bf._size = f._w = 127; /* Leave room for the NUL */
- f._extra = &ext;
- INITEXTRA(&f);
+ f._orientation = 0;
+ memset(&f._mbstate, 0, sizeof(mbstate_t));
va_start(ap, fmt);
ret = __vfprintf(&f, fmt, ap); /* Use unlocked __vfprintf */
va_end(ap);