diff options
| author | Xin LI <delphij@FreeBSD.org> | 2009-12-21 19:59:38 +0000 |
|---|---|---|
| committer | Xin LI <delphij@FreeBSD.org> | 2009-12-21 19:59:38 +0000 |
| commit | 280101b76e7086a633678690431b3d4a48e0e586 (patch) | |
| tree | 2ae1e68cb84d60149ea5b6933018fe4c7dca36e9 /lib/libc/stdio | |
| parent | 42306cb0b386c33c9d34fec40f4ce4a0f8565911 (diff) | |
Notes
Diffstat (limited to 'lib/libc/stdio')
| -rw-r--r-- | lib/libc/stdio/sprintf.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/libc/stdio/sprintf.c b/lib/libc/stdio/sprintf.c index aaaae5535d2c..b55bd6cfa2cb 100644 --- a/lib/libc/stdio/sprintf.c +++ b/lib/libc/stdio/sprintf.c @@ -46,17 +46,9 @@ sprintf(char * __restrict str, char const * __restrict fmt, ...) { int ret; va_list ap; - FILE f; - f._file = -1; - f._flags = __SWR | __SSTR; - f._bf._base = f._p = (unsigned char *)str; - f._bf._size = f._w = INT_MAX; - f._orientation = 0; - memset(&f._mbstate, 0, sizeof(mbstate_t)); va_start(ap, fmt); - ret = __vfprintf(&f, fmt, ap); + ret = vsprintf(str, fmt, ap); va_end(ap); - *f._p = 0; return (ret); } |
