From a531a1e65075d27574bc31d4bac7ab20cb750efd Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 18 Jan 2009 19:37:27 +0100 Subject: conf: added config_get_block_string() This replaces lots of getBlockParam() invocations. --- src/mixer/oss_mixer.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/mixer/oss_mixer.c') diff --git a/src/mixer/oss_mixer.c b/src/mixer/oss_mixer.c index 0ee44a693..5e3b65f46 100644 --- a/src/mixer/oss_mixer.c +++ b/src/mixer/oss_mixer.c @@ -50,21 +50,21 @@ static void oss_mixer_configure(struct mixer_data *data, struct config_param *param) { struct oss_mixer *om = (struct oss_mixer *) data; - struct block_param *bp; + const char *value; if (param == NULL) return; - bp = getBlockParam(param, "mixer_device"); - if (bp) { + value = config_get_block_string(param, "mixer_device", NULL); + if (value != NULL) { g_free(om->device); - om->device = g_strdup(bp->value); + om->device = g_strdup(value); } - bp = getBlockParam(param, "mixer_control"); - if (bp) { + value = config_get_block_string(param, "mixer_control", NULL); + if (value != NULL) { g_free(om->control); - om->control = g_strdup(bp->value); + om->control = g_strdup(value); } } -- cgit v1.2.3