From 74807aabb3083e0750efcfb2ee37a7e3d50abb82 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 29 Mar 2011 19:31:36 +0000 Subject: Tidy expand(). git-svn-id: http://svn.drobilla.net/lad/trunk/slv2@3134 a436a847-0d15-0410-975c-d299462d15a1 --- src/world.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/world.c') diff --git a/src/world.c b/src/world.c index 5493cba..6d31cd7 100644 --- a/src/world.c +++ b/src/world.c @@ -493,14 +493,13 @@ slv2_world_load_bundle(SLV2World world, SLV2Value bundle_uri) serd_node_free(&manifest_uri); } -// Expand POSIX things in path (particularly ~) +/** Expand variables (e.g. POSIX ~ or $FOO, Windows %FOO%) in @a path. */ static char* expand(const char* path) { #ifdef HAVE_WORDEXP char* ret = NULL; wordexp_t p; - wordexp(path, &p, 0); if (p.we_wordc == 0) { /* Literal directory path (e.g. no variables or ~) */ @@ -512,7 +511,6 @@ expand(const char* path) /* Multiple expansions in a single directory path? */ SLV2_ERRORF("malformed path `%s' ignored\n", path); } - wordfree(&p); #elif defined(__WIN32__) static const size_t len = 32767; -- cgit v1.2.1