aboutsummaryrefslogtreecommitdiffstats
path: root/src/mixer
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-25 16:04:03 +0100
committerMax Kellermann <max@duempel.org>2009-01-25 16:04:03 +0100
commit3635c93acbc3da87880e886d924020c427d1774a (patch)
tree4143b680e78794866744b3ac1d0a721d738872c2 /src/mixer
parent5f7791009790dc40f2d76be310ffeab55c242ced (diff)
downloadmpd-3635c93acbc3da87880e886d924020c427d1774a.tar.gz
mpd-3635c93acbc3da87880e886d924020c427d1774a.tar.xz
mpd-3635c93acbc3da87880e886d924020c427d1774a.zip
conf: allow param==NULL
Return the default value in the conf_get_block_*() functions when param==NULL was passed. This simplifies a lot of code, because all initialization can be done in one code path, regardless whether configuration is present.
Diffstat (limited to '')
-rw-r--r--src/mixer/alsa_mixer.c3
-rw-r--r--src/mixer/oss_mixer.c3
2 files changed, 0 insertions, 6 deletions
diff --git a/src/mixer/alsa_mixer.c b/src/mixer/alsa_mixer.c
index d0cfdd5a2..d257dc3e8 100644
--- a/src/mixer/alsa_mixer.c
+++ b/src/mixer/alsa_mixer.c
@@ -48,9 +48,6 @@ alsa_mixer_configure(struct mixer_data *data, const struct config_param *param)
struct alsa_mixer *am = (struct alsa_mixer *)data;
const char *value;
- if (param == NULL)
- return;
-
value = config_get_block_string(param, "mixer_device", NULL);
if (value != NULL) {
g_free(am->device);
diff --git a/src/mixer/oss_mixer.c b/src/mixer/oss_mixer.c
index ed370483d..a72806ead 100644
--- a/src/mixer/oss_mixer.c
+++ b/src/mixer/oss_mixer.c
@@ -52,9 +52,6 @@ oss_mixer_configure(struct mixer_data *data, const struct config_param *param)
struct oss_mixer *om = (struct oss_mixer *) data;
const char *value;
- if (param == NULL)
- return;
-
value = config_get_block_string(param, "mixer_device", NULL);
if (value != NULL) {
g_free(om->device);