mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-01 22:58:49 -04:00
Don't accept an empty string for $ALSA_CONFIG_PATH
The variable $ALSA_CONFIG_PATH specifies the config path, but the current code accepts the empty string and results in a mysterious error because no config file is found. This patch fixes the check of the variable and takes the default value if the string is empty. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
48e4d089dc
commit
0400fa6f8d
1 changed files with 1 additions and 1 deletions
|
|
@ -2962,7 +2962,7 @@ int snd_config_update_r(snd_config_t **_top, snd_config_update_t **_update, cons
|
|||
configs = cfgs;
|
||||
if (!configs) {
|
||||
configs = getenv(ALSA_CONFIG_PATH_VAR);
|
||||
if (!configs)
|
||||
if (!configs || !*configs)
|
||||
configs = ALSA_CONFIG_PATH_DEFAULT;
|
||||
}
|
||||
for (k = 0, c = configs; (l = strcspn(c, ": ")) > 0; ) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue