aboutsummaryrefslogtreecommitdiffstats
path: root/src/reader.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-08-15 15:37:05 +0200
committerDavid Robillard <d@drobilla.net>2020-08-15 22:52:05 +0200
commit18d181f3e8bedb8f1e85d6f1b8a84110d055a3a5 (patch)
tree1fb2a699e3d240435d61ea2d74426094b5281a5c /src/reader.h
parentaf9f6fbab811d12e23c69b3cc849ad08bfb9c282 (diff)
downloadserd-18d181f3e8bedb8f1e85d6f1b8a84110d055a3a5.tar.gz
serd-18d181f3e8bedb8f1e85d6f1b8a84110d055a3a5.tar.bz2
serd-18d181f3e8bedb8f1e85d6f1b8a84110d055a3a5.zip
Make r_err() return a status
Diffstat (limited to 'src/reader.h')
-rw-r--r--src/reader.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/reader.h b/src/reader.h
index 4b31b94d..dfc0f680 100644
--- a/src/reader.h
+++ b/src/reader.h
@@ -85,7 +85,7 @@ struct SerdReaderImpl {
};
SERD_LOG_FUNC(3, 4)
-int
+SerdStatus
r_err(SerdReader* reader, SerdStatus st, const char* fmt, ...);
Ref push_node_padded(SerdReader* reader,
@@ -147,8 +147,9 @@ eat_byte_check(SerdReader* reader, const int byte)
{
const int c = peek_byte(reader);
if (c != byte) {
- return r_err(reader, SERD_ERR_BAD_SYNTAX,
- "expected `%c', not `%c'\n", byte, c);
+ r_err(reader, SERD_ERR_BAD_SYNTAX,
+ "expected `%c', not `%c'\n", byte, c);
+ return 0;
}
return eat_byte_safe(reader, byte);
}