summaryrefslogtreecommitdiffstats
path: root/src/node.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-12-31 14:07:31 +0100
committerDavid Robillard <d@drobilla.net>2020-12-31 14:07:31 +0100
commit7a51f0b8e95d29b5e053db97bf72094e847ee7ef (patch)
tree388ce4b62ee033777125370be4105c5b8aa8b2df /src/node.c
parenta5a72832c05ba2894d90def0b74128a93dcca937 (diff)
downloadlilv-7a51f0b8e95d29b5e053db97bf72094e847ee7ef.tar.gz
lilv-7a51f0b8e95d29b5e053db97bf72094e847ee7ef.tar.bz2
lilv-7a51f0b8e95d29b5e053db97bf72094e847ee7ef.zip
Avoid "else" after "return"
Diffstat (limited to 'src/node.c')
-rw-r--r--src/node.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/node.c b/src/node.c
index 59b3353..fa7e9fe 100644
--- a/src/node.c
+++ b/src/node.c
@@ -241,9 +241,9 @@ lilv_node_equals(const LilvNode* value, const LilvNode* other)
{
if (value == NULL && other == NULL) {
return true;
- } else if (value == NULL || other == NULL) {
- return false;
- } else if (value->type != other->type) {
+ }
+
+ if (value == NULL || other == NULL || value->type != other->type) {
return false;
}
@@ -384,9 +384,12 @@ lilv_node_as_float(const LilvNode* value)
{
if (lilv_node_is_float(value)) {
return value->val.float_val;
- } else if (lilv_node_is_int(value)) {
+ }
+
+ if (lilv_node_is_int(value)) {
return (float)value->val.int_val;
}
+
return NAN;
}