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/fputc.c | |
| parent | 4e2112e165fdd94dee58378e3ea32892f3710cd7 (diff) | |
feat: clang-tidy fixes
Diffstat (limited to 'lib/libc/stdio/fputc.c')
| -rw-r--r-- | lib/libc/stdio/fputc.c | 13 |
1 files changed, 7 insertions, 6 deletions
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 <errno.h> // for EINVAL, errno -#include <libc.h> // for __IMPL -#include <stdio.h> // for EOF, fwrite, FILE, fputc +#include <__stdio.h> // for __FILE +#include <errno.h> // for EINVAL, errno +#include <stdio.h> // 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; } |
