From 7a51f0b8e95d29b5e053db97bf72094e847ee7ef Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 31 Dec 2020 14:07:31 +0100 Subject: Avoid "else" after "return" --- src/node.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/node.c') 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; } -- cgit v1.2.1