X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Fstdio%2Fvdprintf.c;h=c35d9b4fb0412fdefb2f4a07c198b8de8b451871;hp=35ed6e0b6c737dfe75d5b9e86a65e57b19749038;hb=9cb6e6ea120cfaf1df9016883012d22fb57d43e1;hpb=4ee039f3545976f9e3e25a7e5d7b58f1f2316dc3 diff --git a/src/stdio/vdprintf.c b/src/stdio/vdprintf.c index 35ed6e0b..c35d9b4f 100644 --- a/src/stdio/vdprintf.c +++ b/src/stdio/vdprintf.c @@ -5,15 +5,12 @@ static size_t wrap_write(FILE *f, const unsigned char *buf, size_t len) return __stdio_write(f, buf, len); } -int vdprintf(int fd, const char *fmt, va_list ap) +int vdprintf(int fd, const char *restrict fmt, va_list ap) { - int r; - 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); - __oflow(&f); - return r; + return vfprintf(&f, fmt, ap); }