aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2017-09-23 14:39:59 +0200
committerDavid Robillard <d@drobilla.net>2017-09-23 15:59:22 +0200
commit7f965c4bcb94be0ba0c0e73ef7c5c226bad91b8e (patch)
tree1a95188b184ecdba2bc14ddb65b759833bacfdf5 /src
parent33442629822d73f289c9e0ef8736f65442de4d31 (diff)
downloadserd-7f965c4bcb94be0ba0c0e73ef7c5c226bad91b8e.tar.gz
serd-7f965c4bcb94be0ba0c0e73ef7c5c226bad91b8e.tar.bz2
serd-7f965c4bcb94be0ba0c0e73ef7c5c226bad91b8e.zip
Remove duplicated code
Diffstat (limited to 'src')
-rw-r--r--src/reader.c14
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);
}
}