diff options
author | David Robillard <d@drobilla.net> | 2017-09-23 14:39:59 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2017-09-23 15:59:22 +0200 |
commit | 7f965c4bcb94be0ba0c0e73ef7c5c226bad91b8e (patch) | |
tree | 1a95188b184ecdba2bc14ddb65b759833bacfdf5 /src | |
parent | 33442629822d73f289c9e0ef8736f65442de4d31 (diff) | |
download | serd-7f965c4bcb94be0ba0c0e73ef7c5c226bad91b8e.tar.gz serd-7f965c4bcb94be0ba0c0e73ef7c5c226bad91b8e.tar.bz2 serd-7f965c4bcb94be0ba0c0e73ef7c5c226bad91b8e.zip |
Remove duplicated code
Diffstat (limited to 'src')
-rw-r--r-- | src/reader.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/reader.c b/src/reader.c index a8339a89..bdfd23d3 100644 --- a/src/reader.c +++ b/src/reader.c @@ -1660,16 +1660,7 @@ read_statement(SerdReader* reader) } static bool -read_turtleDoc(SerdReader* reader) -{ - while (!reader->eof) { - TRY_RET(read_statement(reader)); - } - return reader->status <= SERD_FAILURE; -} - -static bool -read_trigDoc(SerdReader* reader) +read_turtleTrigDoc(SerdReader* reader) { while (!reader->eof) { TRY_RET(read_statement(reader)); @@ -1736,8 +1727,7 @@ read_doc(SerdReader* reader) { switch (reader->syntax) { case SERD_NQUADS: return read_nquadsDoc(reader); - case SERD_TRIG: return read_trigDoc(reader); - default: return read_turtleDoc(reader); + default: return read_turtleTrigDoc(reader); } } |