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>
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; ) {