aboutsummaryrefslogtreecommitdiffstats
path: root/src/output
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-11-03 07:40:54 +0100
committerMax Kellermann <max@duempel.org>2008-11-03 07:40:54 +0100
commit9074f924e9258e6801d96d7dbc8b9d525b7c6e2a (patch)
tree29946542a1b1938498985d670e97307b53ee934c /src/output
parente6f334a08843c2673262326d22dd27921de6cbbe (diff)
downloadmpd-9074f924e9258e6801d96d7dbc8b9d525b7c6e2a.tar.gz
mpd-9074f924e9258e6801d96d7dbc8b9d525b7c6e2a.tar.xz
mpd-9074f924e9258e6801d96d7dbc8b9d525b7c6e2a.zip
alsa: initialize "device" with NULL
When using autodetection, AlsaData.device wasn't properly initialized with NULL. This broke autodetection randomly.
Diffstat (limited to '')
-rw-r--r--src/output/alsa_plugin.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/output/alsa_plugin.c b/src/output/alsa_plugin.c
index 493eaaa96..a7f37f139 100644
--- a/src/output/alsa_plugin.c
+++ b/src/output/alsa_plugin.c
@@ -57,6 +57,7 @@ static AlsaData *newAlsaData(void)
{
AlsaData *ret = xmalloc(sizeof(AlsaData));
+ ret->device = NULL;
ret->mode = 0;
ret->pcmHandle = NULL;
ret->writei = snd_pcm_writei;
@@ -80,8 +81,6 @@ alsa_configure(AlsaData *ad, ConfigParam *param)
if ((bp = getBlockParam(param, "device")))
ad->device = xstrdup(bp->value);
- else
- ad->device = NULL;
ad->useMmap = getBoolBlockParam(param, "use_mmap", 1);
if (ad->useMmap == CONF_BOOL_UNSET)