From 00744e8b66794fed905d25b2cabc9f4fa4f9dde9 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 18 Jan 2020 15:43:36 +0100 Subject: Clean up path code in lilv_state_delete() --- src/state.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src') 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); -- cgit v1.2.1