diff options
author | Max Kellermann <max@duempel.org> | 2009-03-27 20:10:39 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-03-27 20:10:39 +0100 |
commit | 43864762eec8857a7057944eb27e38140f4e346a (patch) | |
tree | 6607c28c5091a2dda8ec72221b499b47c0ab0db0 /src/mixer_control.c | |
parent | 49e548e773759043e5f99eaa12cb91b5f0b93371 (diff) | |
download | mpd-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 'src/mixer_control.c')
-rw-r--r-- | src/mixer_control.c | 1 |
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; |