From b5cd18739a64c8d923a55b61c89ae3900faafd84 Mon Sep 17 00:00:00 2001 From: Kacper Date: Tue, 9 Dec 2025 21:17:12 +0100 Subject: Fix include paths and formatting inconsistencies --- lib/libc/stdlib/exit.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'lib/libc/stdlib') diff --git a/lib/libc/stdlib/exit.c b/lib/libc/stdlib/exit.c index 34b8a0f2..5fea520e 100644 --- a/lib/libc/stdlib/exit.c +++ b/lib/libc/stdlib/exit.c @@ -1,4 +1,4 @@ -#include +#include #include #include #include @@ -9,26 +9,26 @@ weak_reference(__dummy_atexit_fvec, __atexit_fvec); void (*__dummy_stdio_cleanup)(void); weak_reference(__dummy_stdio_cleanup, __stdio_cleanup); -static void __fclose(FILE *fp) +static void __fclose(FILE *stream) { - if (fp == NULL) { + if (stream == NULL) { return; } - if (fp->buf_len > 0) { - fflush(fp); + if (__IMPL(stream)->buf_len > 0) { + fflush(stream); } - if (fp->fd > STDERR_FILENO) { - close(fp->fd); + if (__IMPL(stream)->fd > STDERR_FILENO) { + close(__IMPL(stream)->fd); } - if (fp->buf) { - free(fp->buf); + if (__IMPL(stream)->buf) { + free(__IMPL(stream)->buf); } - if (fp != stdout && fp != stderr && fp != stdin) { - free(fp); + if (stream != stdout && stream != stderr && stream != stdin) { + free(stream); } } -- cgit v1.2.3