X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Fstdio%2Fsetvbuf.c;h=541a125ff124b1c1b5aa15949f0890a3d12c6f6b;hp=2985d3f1b6b8bcfef43e8bc6308168ce5caa53d0;hb=c8cb6bcdf009e94c12c6e256b8e24a9bc5fdaf05;hpb=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01 diff --git a/src/stdio/setvbuf.c b/src/stdio/setvbuf.c index 2985d3f1..541a125f 100644 --- a/src/stdio/setvbuf.c +++ b/src/stdio/setvbuf.c @@ -9,14 +9,16 @@ * In the case of stderr where the preexisting buffer is length 1, it * is not possible to set line buffering or full buffering. */ -int setvbuf(FILE *f, char *buf, int type, size_t size) +int setvbuf(FILE *restrict f, char *restrict buf, int type, size_t size) { f->lbf = EOF; if (type == _IONBF) - f->buf_size = 1; + f->buf_size = 0; else if (type == _IOLBF) f->lbf = '\n'; + f->flags |= F_SVB; + return 0; }