[vlc-devel] [PATCH 5/5] vlc_media_library.h: uniformize helpers error check

Hugo Beauzée-Luyssen hugo at beauzee.fr
Thu Aug 16 17:55:14 CEST 2018


---
 include/vlc_media_library.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/vlc_media_library.h b/include/vlc_media_library.h
index 5928602144..e2454949e6 100644
--- a/include/vlc_media_library.h
+++ b/include/vlc_media_library.h
@@ -814,7 +814,7 @@ static inline size_t vlc_ml_count_media_of( vlc_medialibrary_t* p_ml, const vlc_
 {
     vlc_assert( p_ml != NULL );
     size_t res;
-    if ( vlc_ml_list( p_ml, VLC_ML_COUNT_MEDIA_OF, params, i_parent_type, i_parent_id, &res ) )
+    if ( vlc_ml_list( p_ml, VLC_ML_COUNT_MEDIA_OF, params, i_parent_type, i_parent_id, &res ) != VLC_SUCCESS )
         return 0;
     return res;
 }
@@ -832,7 +832,7 @@ static inline size_t vlc_ml_count_artists_of( vlc_medialibrary_t* p_ml, const vl
 {
     vlc_assert( p_ml != NULL );
     size_t res;
-    if ( vlc_ml_list( p_ml, VLC_ML_COUNT_ARTISTS_OF, params, i_parent_type, i_parent_id, &res ) )
+    if ( vlc_ml_list( p_ml, VLC_ML_COUNT_ARTISTS_OF, params, i_parent_type, i_parent_id, &res ) != VLC_SUCCESS )
         return 0;
     return res;
 }
@@ -850,7 +850,7 @@ static inline size_t vlc_ml_count_albums_of( vlc_medialibrary_t* p_ml, const vlc
 {
     vlc_assert( p_ml != NULL );
     size_t res;
-    if ( vlc_ml_list( p_ml, VLC_ML_COUNT_ALBUMS_OF, params, i_parent_type, i_parent_id, &res ) )
+    if ( vlc_ml_list( p_ml, VLC_ML_COUNT_ALBUMS_OF, params, i_parent_type, i_parent_id, &res ) != VLC_SUCCESS )
         return 0;
     return res;
 }
-- 
2.18.0



More information about the vlc-devel mailing list