aboutsummaryrefslogtreecommitdiffstats
path: root/src/env.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/env.c')
-rw-r--r--src/env.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/env.c b/src/env.c
index 33077c0c..75ae6485 100644
--- a/src/env.c
+++ b/src/env.c
@@ -250,22 +250,18 @@ serd_env_expand_node(const SerdEnv* const env, const SerdNode* const node)
return SERD_NODE_NULL;
}
- switch (node->type) {
- case SERD_NOTHING:
- case SERD_LITERAL:
- break;
-
- case SERD_URI: {
+ if (node->type == SERD_URI) {
SerdURI ignored;
return serd_node_new_uri_from_node(node, &env->base_uri, &ignored);
}
- case SERD_CURIE: {
+ if (node->type == SERD_CURIE) {
SerdChunk prefix;
SerdChunk suffix;
if (serd_env_expand(env, node, &prefix, &suffix)) {
return SERD_NODE_NULL;
}
+
const size_t len = prefix.len + suffix.len;
uint8_t* buf = (uint8_t*)malloc(len + 1);
SerdNode ret = {buf, len, 0, 0, SERD_URI};
@@ -274,10 +270,6 @@ serd_env_expand_node(const SerdEnv* const env, const SerdNode* const node)
return ret;
}
- case SERD_BLANK:
- break;
- }
-
return SERD_NODE_NULL;
}