[vlc-commits] libvlc: renderer_discoverer: remove usage of ssize_t
Thomas Guillem
git at videolan.org
Tue Sep 27 13:47:57 CEST 2016
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Sep 27 13:41:26 2016 +0200| [e1ef49765dc282b4c617924aa28da455e6220dae] | committer: Thomas Guillem
libvlc: renderer_discoverer: remove usage of ssize_t
It's in POSIX but not in C standard.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e1ef49765dc282b4c617924aa28da455e6220dae
---
include/vlc/libvlc_renderer_discoverer.h | 4 ++--
lib/renderer_discoverer.c | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/include/vlc/libvlc_renderer_discoverer.h b/include/vlc/libvlc_renderer_discoverer.h
index 2e84673..4509506 100644
--- a/include/vlc/libvlc_renderer_discoverer.h
+++ b/include/vlc/libvlc_renderer_discoverer.h
@@ -202,9 +202,9 @@ libvlc_renderer_discoverer_event_manager( libvlc_renderer_discoverer_t *p_rd );
* discoverer services (must be freed with libvlc_renderer_list_release() by
* the caller) [OUT]
*
- * \return the number of media discoverer services or -1 on error
+ * \return the number of media discoverer services (0 on error)
*/
-LIBVLC_API ssize_t
+LIBVLC_API size_t
libvlc_renderer_discoverer_list_get( libvlc_instance_t *p_inst,
libvlc_rd_description_t ***ppp_services );
diff --git a/lib/renderer_discoverer.c b/lib/renderer_discoverer.c
index 5b5e7e3..bb67dae 100644
--- a/lib/renderer_discoverer.c
+++ b/lib/renderer_discoverer.c
@@ -204,7 +204,7 @@ libvlc_renderer_discoverer_list_release( libvlc_rd_description_t **pp_services,
}
}
-ssize_t
+size_t
libvlc_renderer_discoverer_list_get( libvlc_instance_t *p_inst,
libvlc_rd_description_t ***ppp_services )
{
@@ -218,7 +218,7 @@ libvlc_renderer_discoverer_list_get( libvlc_instance_t *p_inst,
if( i_ret != VLC_SUCCESS )
{
*ppp_services = NULL;
- return -1;
+ return 0;
}
/* Count the number of sd matching our category (i_cat/i_core_cat) */
@@ -247,7 +247,7 @@ libvlc_renderer_discoverer_list_get( libvlc_instance_t *p_inst,
free( p_services );
pp_services = NULL;
p_services = NULL;
- i_nb_services = -1;
+ i_nb_services = 0;
/* Even if alloc fails, the next loop must be run in order to free
* names returned by vlc_sd_GetNames */
}
More information about the vlc-commits
mailing list