diff options
| author | Kacper <kacper@mail.openlinux.dev> | 2025-12-09 23:14:53 +0100 |
|---|---|---|
| committer | Kacper <kacper@mail.openlinux.dev> | 2025-12-09 23:14:53 +0100 |
| commit | 169daa11155988a210fac949297381743f3cb400 (patch) | |
| tree | 602ef5df5ae9ea075ab3d5dac3c8ad60da1ea2cc /lib/libc/stdio/fmemopen.c | |
| parent | 4e2112e165fdd94dee58378e3ea32892f3710cd7 (diff) | |
feat: clang-tidy fixes
Diffstat (limited to 'lib/libc/stdio/fmemopen.c')
| -rw-r--r-- | lib/libc/stdio/fmemopen.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/libc/stdio/fmemopen.c b/lib/libc/stdio/fmemopen.c index 21e811fd..920484b3 100644 --- a/lib/libc/stdio/fmemopen.c +++ b/lib/libc/stdio/fmemopen.c @@ -1,10 +1,9 @@ -#include "__stdio.h" // for __libc_fadd +#include "__stdio.h" // for __FILE, __libc_fadd #include "features.h" // for __weak #include "stddef.h" // for NULL #include <errno.h> // for EINVAL, errno #include <fcntl.h> // for O_WRONLY, O_CREAT, O_RDONLY, O_APPEND, O_RDWR -#include <libc.h> // for __IMPL #include <stdio.h> // for FILE, _IOFBF, fmemopen, size_t #include <stdlib.h> // for calloc, free #include <string.h> // for strchr @@ -21,10 +20,10 @@ FILE *fmemopen(void *restrict buf, size_t max_size, const char *restrict mode) if (stream == NULL) return stream; - __IMPL(stream)->fd = -1; - __IMPL(stream)->buf = buf; - __IMPL(stream)->buf_size = max_size; - __IMPL(stream)->type = _IOFBF; + __FILE(stream)->fd = -1; + __FILE(stream)->buf = buf; + __FILE(stream)->buf_size = max_size; + __FILE(stream)->type = _IOFBF; if (mode[0] == 'r') { flags = O_RDONLY; @@ -42,7 +41,7 @@ FILE *fmemopen(void *restrict buf, size_t max_size, const char *restrict mode) flags = (flags & ~(O_RDONLY | O_WRONLY)) | O_RDWR; } - __IMPL(stream)->flags = flags; + __FILE(stream)->flags = flags; __libc_fadd(stream); |
