diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2010-10-12 13:13:20 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2010-10-12 13:13:20 +0000 |
| commit | e4f7beda4d767093c0990e58a28aab00fe7d730e (patch) | |
| tree | 0660f1c54f661a27166ec5cec9fca514f63baa6f /lib/libc/stdio/snprintf.c | |
| parent | 79bd5dc1de54f1dff7bb11e0e696346806987458 (diff) | |
Notes
Diffstat (limited to 'lib/libc/stdio/snprintf.c')
| -rw-r--r-- | lib/libc/stdio/snprintf.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/libc/stdio/snprintf.c b/lib/libc/stdio/snprintf.c index 0470a332cd14..e6d7115fb37f 100644 --- a/lib/libc/stdio/snprintf.c +++ b/lib/libc/stdio/snprintf.c @@ -48,7 +48,7 @@ snprintf(char * __restrict str, size_t n, char const * __restrict fmt, ...) size_t on; int ret; va_list ap; - FILE f; + FILE f = FAKE_FILE; on = n; if (n != 0) @@ -56,12 +56,9 @@ snprintf(char * __restrict str, size_t n, char const * __restrict fmt, ...) if (n > INT_MAX) n = INT_MAX; va_start(ap, fmt); - f._file = -1; f._flags = __SWR | __SSTR; f._bf._base = f._p = (unsigned char *)str; f._bf._size = f._w = n; - f._orientation = 0; - memset(&f._mbstate, 0, sizeof(mbstate_t)); ret = __vfprintf(&f, fmt, ap); if (on > 0) *f._p = '\0'; |
