summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-01-18 15:43:36 +0100
committerDavid Robillard <d@drobilla.net>2020-01-18 15:45:30 +0100
commit00744e8b66794fed905d25b2cabc9f4fa4f9dde9 (patch)
treee49ba162dcc8b5ecc728406827e94a0c4b51e965 /src
parent1bb1de7ecd19a99a1a29a9a4d734fcc38c2ba9cc (diff)
downloadlilv-00744e8b66794fed905d25b2cabc9f4fa4f9dde9.tar.gz
lilv-00744e8b66794fed905d25b2cabc9f4fa4f9dde9.tar.bz2
lilv-00744e8b66794fed905d25b2cabc9f4fa4f9dde9.zip
Clean up path code in lilv_state_delete()
Diffstat (limited to 'src')
-rw-r--r--src/state.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/state.c b/src/state.c
index 7e0f50d..214b670 100644
--- a/src/state.c
+++ b/src/state.c
@@ -1256,17 +1256,16 @@ lilv_state_delete(LilvWorld* world,
model, state->uri->node, world->uris.rdfs_seeAlso, NULL, NULL);
if (file) {
// Remove state file
- char* path =
- (char*)serd_file_uri_parse(sord_node_get_string(file), NULL);
+ const uint8_t* uri = sord_node_get_string(file);
+ char* path = (char*)serd_file_uri_parse(uri, NULL);
try_unlink(state->dir, path);
serd_free(path);
}
// Remove any existing manifest entries for this state
- remove_manifest_entry(
- world->world, model, lilv_node_as_string(state->uri));
- remove_manifest_entry(
- world->world, world->model, lilv_node_as_string(state->uri));
+ const char* state_uri_str = lilv_node_as_string(state->uri);
+ remove_manifest_entry(world->world, model, state_uri_str);
+ remove_manifest_entry(world->world, world->model, state_uri_str);
// Drop bundle from model
lilv_world_unload_bundle(world, bundle);