Commit df7ddbd9 authored by Filip Roséen's avatar Filip Roséen Committed by Thomas Guillem

services_discovery/microdns: fix iteration variable type compared to vlc_array_count

Following the changes introduced by 7ecd9271, the affected lines would
result in a warning due to signed vs unsigned integer comparision.
Signed-off-by: Thomas Guillem's avatarThomas Guillem <thomas@gllm.fr>
parent 66c5dcf5
......@@ -233,7 +233,7 @@ items_release( struct discovery_sys *p_sys, struct item *p_item )
static bool
items_exists( struct discovery_sys *p_sys, const char *psz_uri )
{
for( int i = 0; i < vlc_array_count( &p_sys->items ); ++i )
for( size_t i = 0; i < vlc_array_count( &p_sys->items ); ++i )
{
struct item *p_item = vlc_array_item_at_index( &p_sys->items, i );
if( strcmp( p_item->psz_uri, psz_uri ) == 0 )
......@@ -253,7 +253,7 @@ items_timeout( struct discovery_sys *p_sys, services_discovery_t *p_sd,
mtime_t i_now = mdate();
/* Remove items that are not seen since TIMEOUT */
for( int i = 0; i < vlc_array_count( &p_sys->items ); ++i )
for( size_t i = 0; i < vlc_array_count( &p_sys->items ); ++i )
{
struct item *p_item = vlc_array_item_at_index( &p_sys->items, i );
if( i_now - p_item->i_last_seen > TIMEOUT )
......@@ -271,7 +271,7 @@ items_timeout( struct discovery_sys *p_sys, services_discovery_t *p_sd,
static void
items_clear( struct discovery_sys *p_sys )
{
for( int i = 0; i < vlc_array_count( &p_sys->items ); ++i )
for( size_t i = 0; i < vlc_array_count( &p_sys->items ); ++i )
{
struct item *p_item = vlc_array_item_at_index( &p_sys->items, i );
items_release( p_sys, p_item );
......
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