diff options
author | David Robillard <d@drobilla.net> | 2020-12-31 14:07:31 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-12-31 14:07:31 +0100 |
commit | 7a51f0b8e95d29b5e053db97bf72094e847ee7ef (patch) | |
tree | 388ce4b62ee033777125370be4105c5b8aa8b2df /src/node.c | |
parent | a5a72832c05ba2894d90def0b74128a93dcca937 (diff) | |
download | lilv-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.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -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; } |