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/fputc.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'lib/libc/stdio/fputc.c') diff --git a/lib/libc/stdio/fputc.c b/lib/libc/stdio/fputc.c index 08ab0cfc..922011f2 100644 --- a/lib/libc/stdio/fputc.c +++ b/lib/libc/stdio/fputc.c @@ -1,8 +1,8 @@ #include "stddef.h" // for NULL -#include // for EINVAL, errno -#include // for __IMPL -#include // for EOF, fwrite, FILE, fputc +#include <__stdio.h> // for __FILE +#include // for EINVAL, errno +#include // for EOF, fwrite, FILE, fputc int fputc(int c, FILE *stream) { @@ -11,12 +11,13 @@ int fputc(int c, FILE *stream) return EOF; } - if (__IMPL(stream)->fd == -1 && __IMPL(stream)->buf != NULL) { - if (__IMPL(stream)->buf_len >= __IMPL(stream)->buf_size - 1) { + if ((__FILE(stream))->fd == -1 && (__FILE(stream))->buf != NULL) { + if ((__FILE(stream))->buf_len >= + (__FILE(stream))->buf_size - 1) { return EOF; } - __IMPL(stream)->buf[__IMPL(stream)->buf_len++] = (char)c; + (__FILE(stream))->buf[(__FILE(stream))->buf_len++] = (char)c; return (unsigned char)c; } -- cgit v1.2.3