From aec4fe06b5b8be21f7b016a1bb23d048c8b6380c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 26 Mar 2009 19:46:46 +0100 Subject: oss_mixer: make "device" and "control" const Use config_get_block_string() instead of config_dup_block_string(). --- src/mixer/oss_mixer.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/mixer') 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); } -- cgit v1.2.3