Commit 0bfceb2e authored by Filip Roséen's avatar Filip Roséen Committed by Jean-Baptiste Kempf
Browse files

input/var: removed useless branching in input_ControlVarStop



Given that the for-loop indirectly checks exactly what the sourrounding
if is checking, there is no need for the outer if.
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent ee8f0516
...@@ -236,8 +236,6 @@ void input_ControlVarStop( input_thread_t *p_input ) ...@@ -236,8 +236,6 @@ void input_ControlVarStop( input_thread_t *p_input )
if( p_input->p->i_title > 1 ) if( p_input->p->i_title > 1 )
InputDelCallbacks( p_input, p_input_title_navigation_callbacks ); InputDelCallbacks( p_input, p_input_title_navigation_callbacks );
if( p_input->p->i_title > 0 )
{
for( int i = 0; i < p_input->p->i_title; i++ ) for( int i = 0; i < p_input->p->i_title; i++ )
{ {
char name[sizeof("title ") + 3 * sizeof (int)]; char name[sizeof("title ") + 3 * sizeof (int)];
...@@ -245,7 +243,6 @@ void input_ControlVarStop( input_thread_t *p_input ) ...@@ -245,7 +243,6 @@ void input_ControlVarStop( input_thread_t *p_input )
sprintf( name, "title %2u", i ); sprintf( name, "title %2u", i );
var_DelCallback( p_input, name, NavigationCallback, (void *)(intptr_t)i ); var_DelCallback( p_input, name, NavigationCallback, (void *)(intptr_t)i );
} }
}
if( !demux_Control( p_demux, DEMUX_GET_TITLE, &i_cur_title ) ) if( !demux_Control( p_demux, DEMUX_GET_TITLE, &i_cur_title ) )
{ {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment