aboutsummaryrefslogtreecommitdiffstats
path: root/src/reader.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/reader.c')
-rw-r--r--src/reader.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/reader.c b/src/reader.c
index d515aaab..e9210927 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -348,16 +348,12 @@ serd_reader_read_chunk(SerdReader* reader)
{
SerdStatus st = SERD_SUCCESS;
if (!reader->source.prepared) {
- if ((st = serd_reader_prepare(reader))) {
- return st;
- }
+ st = serd_reader_prepare(reader);
} else if (reader->source.eof) {
- reader->source.eof = false;
- if ((st = serd_byte_source_advance(&reader->source))) {
- return st;
- }
+ st = serd_byte_source_advance(&reader->source);
}
- return read_statement(reader) ? SERD_SUCCESS : SERD_FAILURE;
+
+ return st ? st : read_statement(reader) ? SERD_SUCCESS : SERD_FAILURE;
}
SERD_API