From 24f39222098253da4ad1a9cd8ddef5b9b0152ba1 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Fri, 2 Feb 2024 13:25:45 -0500 Subject: use UNDEFINED() instead of directly calling __undefined() --- src/stdio/fgetc.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/stdio/fgetc.c') diff --git a/src/stdio/fgetc.c b/src/stdio/fgetc.c index 06e4c064..2bae1eb7 100644 --- a/src/stdio/fgetc.c +++ b/src/stdio/fgetc.c @@ -12,9 +12,12 @@ int fgetc(FILE *stream) { SIGNAL_SAFE(0); + ASSERT_STREAM(stream, ORIENT_BYTE, OP_INPUT); + flockfile(stream); char c = getc_unlocked(stream); funlockfile(stream); + /* RETURN_SUCCESS(the next character); RETURN_FAILURE(CONSTANT(EOF)); -- cgit v1.2.1