diff options
| author | Kacper <kacper@mail.openlinux.dev> | 2025-12-22 23:27:56 +0100 |
|---|---|---|
| committer | Kacper <kacper@mail.openlinux.dev> | 2025-12-22 23:30:32 +0100 |
| commit | 0f30d227497418c6d3bef7d52244407e30454504 (patch) | |
| tree | 0e1ac19623d3268380cf74328cdf643648a2f43c /lib/libc/stdio/setvbuf.c | |
| parent | 90dad97fc07f049383903a166631e2c257f9b8c1 (diff) | |
Added c11 threads, fixed some locks and add *_unlocked functions
Diffstat (limited to 'lib/libc/stdio/setvbuf.c')
| -rw-r--r-- | lib/libc/stdio/setvbuf.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libc/stdio/setvbuf.c b/lib/libc/stdio/setvbuf.c index 686640f4..d6b41d31 100644 --- a/lib/libc/stdio/setvbuf.c +++ b/lib/libc/stdio/setvbuf.c @@ -10,13 +10,13 @@ int setvbuf(FILE *restrict stream, char *restrict buf, int type, size_t size) if (type != _IONBF && (buf == NULL || size == 0)) return -1; - if (__FILE(stream)->fd < 0) + if (stream->fd < 0) return -1; - __FILE(stream)->buf = buf; - __FILE(stream)->buf_size = size; - __FILE(stream)->buf_pos = 0; - __FILE(stream)->type = type; + stream->buf = buf; + stream->buf_size = size; + stream->buf_pos = 0; + stream->type = type; return 0; } |
