diff options
author | David Robillard <d@drobilla.net> | 2024-12-11 19:10:42 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2024-12-11 19:39:22 -0500 |
commit | a23f3b993aa379e99c2fff909ea3934992915d21 (patch) | |
tree | c01c8f1ce6353849e343d122b08f91e0f285ca55 /src/world.c | |
parent | 8bd6f662b5cf5111985daad42b21b9da37ab6a44 (diff) | |
download | lilv-a23f3b993aa379e99c2fff909ea3934992915d21.tar.gz lilv-a23f3b993aa379e99c2fff909ea3934992915d21.tar.bz2 lilv-a23f3b993aa379e99c2fff909ea3934992915d21.zip |
Make guarding condition reflect the access it's protecting
Some static analysis tools don't seem to infer that variables can't be zero
from checks using the "!" operator, so check numerically instead.
Diffstat (limited to 'src/world.c')
-rw-r--r-- | src/world.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/world.c b/src/world.c index b299794..1d60c45 100644 --- a/src/world.c +++ b/src/world.c @@ -668,7 +668,7 @@ lilv_world_get_manifest_uri(LilvWorld* world, const LilvNode* bundle_uri) const char* const bundle_uri_string = (const char*)sord_node_get_string_counted(bundle_uri->node, &bundle_uri_length); - if (!bundle_uri_length) { + if (bundle_uri_length < 1U) { return NULL; } |