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/fseek.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'lib/libc/stdio/fseek.c') diff --git a/lib/libc/stdio/fseek.c b/lib/libc/stdio/fseek.c index 0e425e8e..7a6754f7 100644 --- a/lib/libc/stdio/fseek.c +++ b/lib/libc/stdio/fseek.c @@ -1,31 +1,30 @@ -#include "__stdio.h" // for _IO_EOF, _IO_ERR +#include "__stdio.h" // for __FILE, _IO_EOF, _IO_ERR #include "stddef.h" // for NULL #include // for LIBC_LOCK, LIBC_UNLOCK -#include // for __IMPL #include // for FILE, fseek #include // for lseek, off_t int fseek(FILE *stream, long offset, int whence) { - if (stream == NULL || __IMPL(stream)->fd < 0) + if (stream == NULL || __FILE(stream)->fd < 0) return -1; - LIBC_LOCK(__IMPL(stream)->lock); + LIBC_LOCK(__FILE(stream)->lock); - __IMPL(stream)->buf_pos = 0; - __IMPL(stream)->buf_len = 0; - __IMPL(stream)->flags &= ~_IO_EOF; + __FILE(stream)->buf_pos = 0; + __FILE(stream)->buf_len = 0; + __FILE(stream)->flags &= ~_IO_EOF; - off_t result = lseek(__IMPL(stream)->fd, offset, whence); + off_t result = lseek(__FILE(stream)->fd, offset, whence); - LIBC_UNLOCK(__IMPL(stream)->lock); + LIBC_UNLOCK(__FILE(stream)->lock); if (result == (off_t)-1) { - __IMPL(stream)->flags |= _IO_ERR; + __FILE(stream)->flags |= _IO_ERR; return -1; } - __IMPL(stream)->offset = result; + __FILE(stream)->offset = result; return 0; } -- cgit v1.2.3