aboutsummaryrefslogtreecommitdiffstats
path: root/src/env.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-12-31 12:37:57 +0100
committerDavid Robillard <d@drobilla.net>2020-12-31 12:37:57 +0100
commit8a93d0b3be5b6d80a1bef85bc73b2661f5ab4376 (patch)
treec65c3327fde67505a8f989e57cb245ee0f286cb9 /src/env.c
parent19d8a055ff1e58a699e3679b701a1a60a2927243 (diff)
downloadserd-8a93d0b3be5b6d80a1bef85bc73b2661f5ab4376.tar.gz
serd-8a93d0b3be5b6d80a1bef85bc73b2661f5ab4376.tar.bz2
serd-8a93d0b3be5b6d80a1bef85bc73b2661f5ab4376.zip
Avoid "else" after "break" and "return"
Diffstat (limited to 'src/env.c')
-rw-r--r--src/env.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/env.c b/src/env.c
index 843db088..d11553b4 100644
--- a/src/env.c
+++ b/src/env.c
@@ -76,7 +76,9 @@ serd_env_set_base_uri(SerdEnv* env,
{
if (!env || (uri && uri->type != SERD_URI)) {
return SERD_ERR_BAD_ARG;
- } else if (!uri || !uri->buf) {
+ }
+
+ if (!uri || !uri->buf) {
serd_node_free(&env->base_uri_node);
env->base_uri_node = SERD_NODE_NULL;
env->base_uri = SERD_URI_NULL;
@@ -139,7 +141,9 @@ serd_env_set_prefix(SerdEnv* env,
{
if (!name->buf || uri->type != SERD_URI) {
return SERD_ERR_BAD_ARG;
- } else if (serd_uri_string_has_scheme(uri->buf)) {
+ }
+
+ if (serd_uri_string_has_scheme(uri->buf)) {
// Set prefix to absolute URI
serd_env_add(env, name, uri);
} else {
@@ -152,6 +156,7 @@ serd_env_set_prefix(SerdEnv* env,
serd_env_add(env, name, &abs_uri_node);
serd_node_free(&abs_uri_node);
}
+
return SERD_SUCCESS;
}