aboutsummaryrefslogtreecommitdiffstats
path: root/src/mixer/oss_mixer.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-03-26 19:46:46 +0100
committerMax Kellermann <max@duempel.org>2009-03-26 19:46:46 +0100
commitaec4fe06b5b8be21f7b016a1bb23d048c8b6380c (patch)
treecaf2ded216e0c24c663a386170bc3e1ca5bfeb22 /src/mixer/oss_mixer.c
parent69759b573f549857daef8789741903a03f8e9b22 (diff)
downloadmpd-aec4fe06b5b8be21f7b016a1bb23d048c8b6380c.tar.gz
mpd-aec4fe06b5b8be21f7b016a1bb23d048c8b6380c.tar.xz
mpd-aec4fe06b5b8be21f7b016a1bb23d048c8b6380c.zip
oss_mixer: make "device" and "control" const
Use config_get_block_string() instead of config_dup_block_string().
Diffstat (limited to '')
-rw-r--r--src/mixer/oss_mixer.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/mixer/oss_mixer.c b/src/mixer/oss_mixer.c
index 96339e85c..6143b91e4 100644
--- a/src/mixer/oss_mixer.c
+++ b/src/mixer/oss_mixer.c
@@ -40,8 +40,9 @@ struct oss_mixer {
/** the base mixer class */
struct mixer base;
- char *device;
- char *control;
+ const char *device;
+ const char *control;
+
int device_fd;
int volume_control;
};
@@ -53,8 +54,8 @@ oss_mixer_init(const struct config_param *param)
mixer_init(&om->base, &oss_mixer);
- om->device = config_dup_block_string(param, "mixer_device", NULL);
- om->control = config_dup_block_string(param, "mixer_control", NULL);
+ om->device = config_get_block_string(param, "mixer_device", NULL);
+ om->control = config_get_block_string(param, "mixer_control", NULL);
om->device_fd = -1;
om->volume_control = SOUND_MIXER_PCM;
@@ -67,8 +68,6 @@ oss_mixer_finish(struct mixer *data)
{
struct oss_mixer *om = (struct oss_mixer *) data;
- g_free(om->device);
- g_free(om->control);
g_free(om);
}