From 43864762eec8857a7057944eb27e38140f4e346a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 27 Mar 2009 20:10:39 +0100 Subject: 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. --- src/mixer_control.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mixer_control.c') 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; -- cgit v1.2.3