[vlc-commits] lib: remove redundant test
Rémi Denis-Courmont
git at videolan.org
Thu Feb 23 20:10:47 CET 2017
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Feb 23 21:10:17 2017 +0200| [21a746d43cdf367d6482b0c4dda8ef4b14a1bdad] | committer: Rémi Denis-Courmont
lib: remove redundant test
If index < 0, then (size_t) index > SSIZE_MAX.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=21a746d43cdf367d6482b0c4dda8ef4b14a1bdad
---
lib/media_list.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/media_list.c b/lib/media_list.c
index 05722e3..53c1b6c 100644
--- a/lib/media_list.c
+++ b/lib/media_list.c
@@ -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;
More information about the vlc-commits
mailing list