From 1dd97fa51d474520c9b8ca002b58603e4234abab Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 21 Sep 2024 13:23:13 -0400 Subject: Remove unnecessary stdio.h includes --- src/reader.h | 6 +++--- src/system.c | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/reader.h b/src/reader.h index 9b558d1f..7768f3b6 100644 --- a/src/reader.h +++ b/src/reader.h @@ -12,8 +12,8 @@ #include #include +#include #include -#include #ifdef SERD_STACK_CHECK # define SERD_STACK_ASSERT_TOP(reader, ref) \ @@ -114,7 +114,7 @@ peek_byte(SerdReader* reader) { SerdByteSource* source = &reader->source; - return source->eof ? EOF : (int)source->read_buf[source->read_head]; + return source->eof ? -1 : (int)source->read_buf[source->read_head]; } static inline SerdStatus @@ -163,7 +163,7 @@ eat_string(SerdReader* reader, const char* str, unsigned n) static inline SerdStatus push_byte(SerdReader* reader, Ref ref, const int c) { - assert(c != EOF); + assert(c >= 0); SERD_STACK_ASSERT_TOP(reader, ref); uint8_t* const s = (uint8_t*)serd_stack_push(&reader->stack, 1); diff --git a/src/system.c b/src/system.c index 072d2ed5..84916060 100644 --- a/src/system.c +++ b/src/system.c @@ -15,7 +15,6 @@ #endif #include -#include #include #include -- cgit v1.2.1