aboutsummaryrefslogtreecommitdiffstats
path: root/src/reader.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2024-06-24 08:04:39 -0400
committerDavid Robillard <d@drobilla.net>2024-06-24 08:22:43 -0400
commit570b40e58eed90c5ec747c44e791c5321c2ea604 (patch)
tree92117aa4c2cf318d9c6e63d8630de732b4df8c03 /src/reader.c
parentd2663582ca9305a36f9107cf95b951393a1563dc (diff)
downloadserd-570b40e58eed90c5ec747c44e791c5321c2ea604.tar.gz
serd-570b40e58eed90c5ec747c44e791c5321c2ea604.tar.bz2
serd-570b40e58eed90c5ec747c44e791c5321c2ea604.zip
Clean up nonnull parameter assertions
Diffstat (limited to 'src/reader.c')
-rw-r--r--src/reader.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/reader.c b/src/reader.c
index 1936808a..aa24a9ca 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -200,6 +200,7 @@ serd_reader_new(const SerdSyntax syntax,
void
serd_reader_set_strict(SerdReader* const reader, const bool strict)
{
+ assert(reader);
reader->strict = strict;
}
@@ -208,6 +209,7 @@ serd_reader_set_error_sink(SerdReader* const reader,
const SerdErrorSink error_sink,
void* const error_handle)
{
+ assert(reader);
reader->error_sink = error_sink;
reader->error_handle = error_handle;
}
@@ -392,6 +394,9 @@ serd_reader_read_file_handle(SerdReader* const reader,
FILE* const file,
const uint8_t* const name)
{
+ assert(reader);
+ assert(file);
+
return serd_reader_read_source(reader,
(SerdSource)fread,
(SerdStreamErrorFunc)ferror,