Commit 7f614e92 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

duplicate: cleaning up

parent 5caa2bab
......@@ -299,26 +299,27 @@ static int Send( sout_stream_t *p_stream, sout_stream_id_t *id,
/*****************************************************************************
* Divers
*****************************************************************************/
static bool NumInRange( char *psz_range, int i_num )
static bool NumInRange( const char *psz_range, int i_num )
{
char *psz = strchr( psz_range, '-' );
const char *psz = strchr( psz_range, '-' );
char *end;
int i_start, i_stop;
if( psz )
{
i_start = strtol( psz_range, &end, 0 );
if( end == psz_range ) i_start = i_num;
if( end == psz_range )
i_start = i_num;
i_stop = strtol( psz+1, &end, 0 );
if( end == psz_range ) i_stop = i_num;
}
else
if( psz )
{
i_start = i_stop = strtol( psz_range, NULL, 0 );
psz++;
i_stop = strtol( psz, &end, 0 );
if( end == psz )
i_stop = i_num
}
else
i_stop = i_start;
return i_start <= i_num && i_num <= i_stop ? true : false;
return i_start <= i_num && i_num <= i_stop;
}
static bool ESSelected( es_format_t *fmt, char *psz_select )
......
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