From 169daa11155988a210fac949297381743f3cb400 Mon Sep 17 00:00:00 2001 From: Kacper Date: Tue, 9 Dec 2025 23:14:53 +0100 Subject: feat: clang-tidy fixes --- lib/libc/stdio/fmemopen.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'lib/libc/stdio/fmemopen.c') 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 // for EINVAL, errno #include // for O_WRONLY, O_CREAT, O_RDONLY, O_APPEND, O_RDWR -#include // for __IMPL #include // for FILE, _IOFBF, fmemopen, size_t #include // for calloc, free #include // 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); -- cgit v1.2.3