From: Takashi Iwai Date: Tue, 29 Nov 2005 15:20:07 +0000 (+0000) Subject: Use snd_user_file() in pcm_ladpsa.c X-Git-Tag: v1.0.11rc1~13 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=d9680921a92fb7841477c24debb328c3e63f15af;p=alsa-lib.git Use snd_user_file() in pcm_ladpsa.c Use snd_user_file() in pcm_ladpsa.c to get rid of wordexp. --- diff --git a/src/pcm/pcm_ladspa.c b/src/pcm/pcm_ladspa.c index dd415499..8bc65a40 100644 --- a/src/pcm/pcm_ladspa.c +++ b/src/pcm/pcm_ladspa.c @@ -28,7 +28,6 @@ #include #include -#include #include #include "pcm_local.h" #include "pcm_plugin.h" @@ -815,26 +814,18 @@ static int snd_pcm_ladspa_look_for_plugin(snd_pcm_ladspa_plugin_t * const plugin { const char *c; size_t l; - wordexp_t we; int err; for (c = path; (l = strcspn(c, ": ")) > 0; ) { char name[l + 1]; + char *fullpath; memcpy(name, c, l); name[l] = 0; - err = wordexp(name, &we, WRDE_NOCMD); - switch (err) { - case WRDE_NOSPACE: - return -ENOMEM; - case 0: - if (we.we_wordc == 1) - break; - /* Fall through */ - default: - return -EINVAL; - } - err = snd_pcm_ladspa_check_dir(plugin, we.we_wordv[0], label, ladspa_id); - wordfree(&we); + err = snd_user_file(name, &fullpath); + if (err < 0) + return err; + err = snd_pcm_ladspa_check_dir(plugin, fullpath, label, ladspa_id); + free(fullpath); if (err < 0) return err; if (err > 0)