Commit 21a746d4 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

lib: remove redundant test

If index < 0, then (size_t) index > SSIZE_MAX.
parent c6c7b68e
......@@ -393,7 +393,7 @@ int libvlc_media_list_internal_remove_index( libvlc_media_list_t * p_mlist,
{
libvlc_media_t * p_md;
if( index < 0 || (size_t) index >= vlc_array_count( &p_mlist->items ))
if( (size_t) index >= vlc_array_count( &p_mlist->items ))
{
libvlc_printerr( "Index out of bounds" );
return -1;
......@@ -420,7 +420,7 @@ libvlc_media_list_item_at_index( libvlc_media_list_t * p_mlist,
{
libvlc_media_t * p_md;
if( index < 0 || (size_t) index >= vlc_array_count( &p_mlist->items ))
if( (size_t) index >= vlc_array_count( &p_mlist->items ))
{
libvlc_printerr( "Index out of bounds" );
return NULL;
......
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