[vlc-commits] RC (old): remove useless check for AOUT_VOLUME_MAX

Rémi Denis-Courmont git at videolan.org
Tue Jul 26 17:41:54 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Jul 26 18:17:42 2011 +0300| [cb96c1cd306e40e855daa192937c4093eb92344d] | committer: Rémi Denis-Courmont

RC (old): remove useless check for AOUT_VOLUME_MAX

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cb96c1cd306e40e855daa192937c4093eb92344d
---

 modules/control/rc.c |   20 ++++++--------------
 1 files changed, 6 insertions(+), 14 deletions(-)

diff --git a/modules/control/rc.c b/modules/control/rc.c
index 5fca974..b88d08d 100644
--- a/modules/control/rc.c
+++ b/modules/control/rc.c
@@ -1496,20 +1496,12 @@ static int Volume( vlc_object_t *p_this, char const *psz_cmd,
     {
         /* Set. */
         audio_volume_t i_volume = atoi( newval.psz_string );
-        if ( (i_volume > (audio_volume_t)AOUT_VOLUME_MAX) )
-        {
-            msg_rc( "Volume must be in the range 0-%d.", AOUT_VOLUME_MAX );
-            i_error = VLC_EBADVAR;
-        }
-        else
-        {
-            if( i_volume == 0 )
-                aout_ToggleMute( p_playlist, NULL );
-            if( !aout_VolumeSet( p_playlist, i_volume ) )
-                i_error = VLC_SUCCESS;
-            osd_Volume( p_this );
-            msg_rc( STATUS_CHANGE "( audio volume: %d )", i_volume );
-        }
+        if( i_volume == 0 )
+            aout_ToggleMute( p_playlist, NULL );
+        if( !aout_VolumeSet( p_playlist, i_volume ) )
+            i_error = VLC_SUCCESS;
+        osd_Volume( p_this );
+        msg_rc( STATUS_CHANGE "( audio volume: %d )", i_volume );
     }
     else
     {



More information about the vlc-commits mailing list