X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fstdio%2Fvdprintf.c;h=b41a3c74cecfc08c1f1ad9c2cdbfe6d24af321bf;hb=98c5583ad5d633166e28034c0a3544ad48b532b6;hp=faf9536a7d529ee488c95d40c82b342b402c2a99;hpb=e3cd6c5c265cd481db6e0c5b529855d99f0bda30;p=musl 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); }