diff options
author | David Robillard <d@drobilla.net> | 2022-12-10 13:48:57 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-12-10 19:04:45 -0500 |
commit | 708911daa222ac5f1423a02ebc89eeaf21548f5a (patch) | |
tree | 697278b2b700d3856b52a6150c1a7da82a91d4f2 /src/world.c | |
parent | 1988db57ca8003a406e08855ab66d1891fc5ce6b (diff) | |
download | lilv-708911daa222ac5f1423a02ebc89eeaf21548f5a.tar.gz lilv-708911daa222ac5f1423a02ebc89eeaf21548f5a.tar.bz2 lilv-708911daa222ac5f1423a02ebc89eeaf21548f5a.zip |
Avoid "suspicious" string comparisons
Diffstat (limited to 'src/world.c')
-rw-r--r-- | src/world.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/world.c b/src/world.c index 23116e9..695cc29 100644 --- a/src/world.c +++ b/src/world.c @@ -1093,11 +1093,11 @@ lilv_world_load_file(LilvWorld* world, SerdReader* reader, const LilvNode* uri) size_t uri_len = 0; const uint8_t* const uri_str = sord_node_get_string_counted(uri->node, &uri_len); - if (strncmp((const char*)uri_str, "file:", 5)) { + if (!!strncmp((const char*)uri_str, "file:", 5)) { return SERD_FAILURE; // Not a local file } - if (strcmp((const char*)uri_str + uri_len - 4, ".ttl")) { + if (!!strcmp((const char*)uri_str + uri_len - 4, ".ttl")) { return SERD_FAILURE; // Not a Turtle file } |