diff options
author | David Robillard <d@drobilla.net> | 2024-09-21 13:23:13 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2024-09-27 13:05:22 -0400 |
commit | 1dd97fa51d474520c9b8ca002b58603e4234abab (patch) | |
tree | e6572e2d7e5c78511e9f6523299e57601c497cdd | |
parent | aec19c24a90373906a456ed09aaf23a18b7229ba (diff) | |
download | serd-1dd97fa51d474520c9b8ca002b58603e4234abab.tar.gz serd-1dd97fa51d474520c9b8ca002b58603e4234abab.tar.bz2 serd-1dd97fa51d474520c9b8ca002b58603e4234abab.zip |
Remove unnecessary stdio.h includes
-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> |