summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/stdio/vdprintf.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/stdio/vdprintf.c b/src/stdio/vdprintf.c
index faf9536a..b41a3c74 100644
--- a/src/stdio/vdprintf.c
+++ b/src/stdio/vdprintf.c
@@ -7,13 +7,10 @@ static size_t wrap_write(FILE *f, const unsigned char *buf, size_t len)
int vdprintf(int fd, const char *fmt, va_list ap)
{
- int r;
- unsigned char buf[BUFSIZ];
FILE f = {
.fd = fd, .lbf = EOF, .write = wrap_write,
- .buf = buf+UNGET, .buf_size = sizeof buf - UNGET,
+ .buf = (void *)fmt, .buf_size = 0,
.lock = -1
};
- r = vfprintf(&f, fmt, ap);
- return fflush(&f) ? EOF : r;
+ return vfprintf(&f, fmt, ap);
}