diff options
author | Max Kellermann <max@duempel.org> | 2009-03-26 19:48:55 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-03-26 19:48:55 +0100 |
commit | f06f049cd8f9f5d0458e9dc7ebe72d8dfbc95d10 (patch) | |
tree | 0cb924c8624052fb644e5339e0c9dc6037729212 /src/mixer | |
parent | c552d17c03f3903e862e4958b530aa0c5c1b84f4 (diff) | |
download | mpd-f06f049cd8f9f5d0458e9dc7ebe72d8dfbc95d10.tar.gz mpd-f06f049cd8f9f5d0458e9dc7ebe72d8dfbc95d10.tar.xz mpd-f06f049cd8f9f5d0458e9dc7ebe72d8dfbc95d10.zip |
alsa_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/alsa_mixer.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/mixer/alsa_mixer.c b/src/mixer/alsa_mixer.c index 892cef2b4..62f501110 100644 --- a/src/mixer/alsa_mixer.c +++ b/src/mixer/alsa_mixer.c @@ -30,8 +30,9 @@ struct alsa_mixer { /** the base mixer class */ struct mixer base; - char *device; - char *control; + const char *device; + const char *control; + snd_mixer_t *handle; snd_mixer_elem_t *elem; long volume_min; @@ -46,8 +47,8 @@ alsa_mixer_init(const struct config_param *param) mixer_init(&am->base, &alsa_mixer); - am->device = config_dup_block_string(param, "mixer_device", NULL); - am->control = config_dup_block_string(param, "mixer_control", NULL); + am->device = config_get_block_string(param, "mixer_device", NULL); + am->control = config_get_block_string(param, "mixer_control", NULL); am->handle = NULL; am->elem = NULL; @@ -63,8 +64,6 @@ alsa_mixer_finish(struct mixer *data) { struct alsa_mixer *am = (struct alsa_mixer *)data; - g_free(am->device); - g_free(am->control); g_free(am); } |