mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-03 09:01:52 -05:00
ucm: handle empty string also for ${env:} substitution
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
8b64f22459
commit
9649b64c6f
1 changed files with 7 additions and 1 deletions
|
|
@ -490,7 +490,13 @@ static char *rval_env(snd_use_case_mgr_t *uc_mgr ATTRIBUTE_UNUSED, const char *i
|
||||||
{
|
{
|
||||||
char *e;
|
char *e;
|
||||||
|
|
||||||
e = getenv(id);
|
if (*id == '-') {
|
||||||
|
e = getenv(id + 1);
|
||||||
|
if (e == NULL)
|
||||||
|
e = "";
|
||||||
|
} else {
|
||||||
|
e = getenv(id);
|
||||||
|
}
|
||||||
if (e)
|
if (e)
|
||||||
return strdup(e);
|
return strdup(e);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue