summaryrefslogtreecommitdiffstats
path: root/src/world.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-07-11 19:30:04 -0400
committerDavid Robillard <d@drobilla.net>2016-07-11 20:03:13 -0400
commit05f9e858a5dd4b3a1ba5047aa703e55da70dcfdf (patch)
treeff0f07004bf7430a9faeded9c2c6db77925f6309 /src/world.c
parent54f33b063642467adfe369fe1abd76c13af95734 (diff)
downloadlilv-05f9e858a5dd4b3a1ba5047aa703e55da70dcfdf.tar.gz
lilv-05f9e858a5dd4b3a1ba5047aa703e55da70dcfdf.tar.bz2
lilv-05f9e858a5dd4b3a1ba5047aa703e55da70dcfdf.zip
Improve test coverage
Diffstat (limited to 'src/world.c')
-rw-r--r--src/world.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/world.c b/src/world.c
index b608261..d08e32d 100644
--- a/src/world.c
+++ b/src/world.c
@@ -335,15 +335,12 @@ lilv_lib_compare(const void* a, const void* b, void* user_data)
static ZixTreeIter*
lilv_collection_find_by_uri(const ZixTree* seq, const LilvNode* uri)
{
- if (!lilv_node_is_uri(uri)) {
- return NULL;
+ ZixTreeIter* i = NULL;
+ if (lilv_node_is_uri(uri)) {
+ struct LilvHeader key = { NULL, (LilvNode*)uri };
+ zix_tree_find(seq, &key, &i);
}
-
- struct LilvHeader key = { NULL, (LilvNode*)uri };
- ZixTreeIter* i = NULL;
- const ZixStatus st = zix_tree_find(seq, &key, &i);
-
- return st ? NULL : i;
+ return i;
}
/** Get an element of a collection of any object with an LilvHeader by URI. */