diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/reader.h | 6 | ||||
-rw-r--r-- | 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 <assert.h> #include <stdbool.h> +#include <stddef.h> #include <stdint.h> -#include <stdio.h> #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 <errno.h> -#include <stdio.h> #include <stdlib.h> #include <string.h> |