summaryrefslogtreecommitdiff
path: root/lib/libc/stdio/fmemopen.c
diff options
context:
space:
mode:
authorKacper <kacper@mail.openlinux.dev>2025-12-22 23:27:56 +0100
committerKacper <kacper@mail.openlinux.dev>2025-12-22 23:30:32 +0100
commit0f30d227497418c6d3bef7d52244407e30454504 (patch)
tree0e1ac19623d3268380cf74328cdf643648a2f43c /lib/libc/stdio/fmemopen.c
parent90dad97fc07f049383903a166631e2c257f9b8c1 (diff)
Added c11 threads, fixed some locks and add *_unlocked functions
Diffstat (limited to 'lib/libc/stdio/fmemopen.c')
-rw-r--r--lib/libc/stdio/fmemopen.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libc/stdio/fmemopen.c b/lib/libc/stdio/fmemopen.c
index e1b2ccff..1e90b5ea 100644
--- a/lib/libc/stdio/fmemopen.c
+++ b/lib/libc/stdio/fmemopen.c
@@ -21,10 +21,10 @@ FILE *fmemopen(void *restrict buf, size_t max_size, const char *restrict mode)
if (stream == NULL)
return stream;
- __FILE(stream)->fd = -1;
- __FILE(stream)->buf = buf;
- __FILE(stream)->buf_size = max_size;
- __FILE(stream)->type = _IOFBF;
+ stream->fd = -1;
+ stream->buf = buf;
+ stream->buf_size = max_size;
+ stream->type = _IOFBF;
if (mode[0] == 'r') {
flags = O_RDONLY;
@@ -42,7 +42,7 @@ FILE *fmemopen(void *restrict buf, size_t max_size, const char *restrict mode)
flags = (flags & ~(O_RDONLY | O_WRONLY)) | O_RDWR;
}
- __FILE(stream)->flags = flags;
+ stream->flags = flags;
__libc_fadd(stream);