diff options
Diffstat (limited to 'src/reader.c')
-rw-r--r-- | src/reader.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/reader.c b/src/reader.c index 4235168a..2d1fbd7e 100644 --- a/src/reader.c +++ b/src/reader.c @@ -87,7 +87,6 @@ push_node_padded(SerdReader* reader, size_t maxlen, &reader->stack, sizeof(SerdNode) + maxlen + 1, sizeof(SerdNode)); if (!mem) { - reader->status = SERD_ERR_OVERFLOW; return NULL; } @@ -283,15 +282,15 @@ serd_reader_start_string(SerdReader* reader, static SerdStatus serd_reader_prepare(SerdReader* reader) { - reader->status = serd_byte_source_prepare(&reader->source); - if (reader->status == SERD_SUCCESS) { - reader->status = skip_bom(reader); - } else if (reader->status == SERD_FAILURE) { + SerdStatus st = serd_byte_source_prepare(&reader->source); + if (st == SERD_SUCCESS) { + st = skip_bom(reader); + } else if (st == SERD_FAILURE) { reader->source.eof = true; } else { - r_err(reader, reader->status, "read error: %s\n", strerror(errno)); + r_err(reader, st, "error preparing read: %s\n", strerror(errno)); } - return reader->status; + return st; } SerdStatus |