diff options
author | David Robillard <d@drobilla.net> | 2020-08-15 15:37:05 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-08-15 22:52:05 +0200 |
commit | 18d181f3e8bedb8f1e85d6f1b8a84110d055a3a5 (patch) | |
tree | 1fb2a699e3d240435d61ea2d74426094b5281a5c /src/reader.h | |
parent | af9f6fbab811d12e23c69b3cc849ad08bfb9c282 (diff) | |
download | serd-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.h | 7 |
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); } |