summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-12-10 18:20:50 +0100
committerTakashi Iwai <tiwai@suse.de>2008-12-10 18:20:50 +0100
commit0400fa6f8d979b708bb36a35c9fbe22e3949912d (patch)
tree64a17402e26b24d104677916dbebaa030d38b84f
parent48e4d089dc68ad29267fe6b9c7efc4a66611aeda (diff)
downloadalsa-lib-0400fa6f8d979b708bb36a35c9fbe22e3949912d.tar.gz
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>
-rw-r--r--src/conf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/conf.c b/src/conf.c
index 32a76085..c86f819b 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -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; ) {