aboutsummaryrefslogtreecommitdiffstats
path: root/src/mixer_control.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-03-27 20:10:39 +0100
committerMax Kellermann <max@duempel.org>2009-03-27 20:10:39 +0100
commit43864762eec8857a7057944eb27e38140f4e346a (patch)
tree6607c28c5091a2dda8ec72221b499b47c0ab0db0 /src/mixer_control.c
parent49e548e773759043e5f99eaa12cb91b5f0b93371 (diff)
downloadmpd-43864762eec8857a7057944eb27e38140f4e346a.tar.gz
mpd-43864762eec8857a7057944eb27e38140f4e346a.tar.xz
mpd-43864762eec8857a7057944eb27e38140f4e346a.zip
mixer: assert that the new volume value is valid
Added an assertion in mixer_set_volume(). Removed the range checks from the ALSA and OSS plugins.
Diffstat (limited to '')
-rw-r--r--src/mixer_control.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mixer_control.c b/src/mixer_control.c
index 9c361e5da..a17885935 100644
--- a/src/mixer_control.c
+++ b/src/mixer_control.c
@@ -165,6 +165,7 @@ mixer_set_volume(struct mixer *mixer, unsigned volume)
bool success;
assert(mixer != NULL);
+ assert(volume <= 100);
if (mixer->plugin->global && !mixer->failed && !mixer_open(mixer))
return false;