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/stdio/ferror.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'lib/libc/stdio/ferror.c') diff --git a/lib/libc/stdio/ferror.c b/lib/libc/stdio/ferror.c index b4e438b3..69ef439d 100644 --- a/lib/libc/stdio/ferror.c +++ b/lib/libc/stdio/ferror.c @@ -1,10 +1,13 @@ -#include -#include +#include "__stdio.h" // for _IO_ERR +#include "stddef.h" // for NULL + +#include // for __IMPL +#include // for FILE, ferror int ferror(FILE *stream) { - if (!stream) + if (stream == NULL) return 0; - return (stream->flags & _IO_ERR) != 0; + return (__IMPL(stream)->flags & _IO_ERR) != 0; } -- cgit v1.2.3