[vlc-commits] sap: fix variable shadowing
Rémi Denis-Courmont
git at videolan.org
Thu Jun 29 22:36:07 CEST 2017
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jun 29 23:28:19 2017 +0300| [7f68f9bf689ea30bbd9d3a0e67ac377701eac2f0] | committer: Rémi Denis-Courmont
sap: fix variable shadowing
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7f68f9bf689ea30bbd9d3a0e67ac377701eac2f0
---
modules/services_discovery/sap.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/modules/services_discovery/sap.c b/modules/services_discovery/sap.c
index 615ee117e9..9a9f940467 100644
--- a/modules/services_discovery/sap.c
+++ b/modules/services_discovery/sap.c
@@ -458,7 +458,6 @@ static void *Run( void *data )
{
services_discovery_t *p_sd = data;
char *psz_addr;
- int i;
int timeout = -1;
int canc = vlc_savecancel ();
@@ -576,7 +575,7 @@ static void *Run( void *data )
timeout = 1000 * 60 * 60;
/* Check for items that need deletion */
- for( i = 0; i < p_sd->p_sys->i_announces; i++ )
+ for( int i = 0; i < p_sd->p_sys->i_announces; i++ )
{
mtime_t i_timeout = ( mtime_t ) 1000000 * p_sd->p_sys->i_timeout;
sap_announce_t * p_announce = p_sd->p_sys->pp_announces[i];
@@ -662,7 +661,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
static int ParseSAP( services_discovery_t *p_sd, const uint8_t *buf,
size_t len )
{
- int i;
const char *psz_sdp;
const uint8_t *end = buf + len;
sdp_t *p_sdp;
@@ -787,7 +785,7 @@ static int ParseSAP( services_discovery_t *p_sd, const uint8_t *buf,
goto error;
}
- for( i = 0 ; i< p_sd->p_sys->i_announces ; i++ )
+ for( int i = 0 ; i< p_sd->p_sys->i_announces ; i++ )
{
sap_announce_t * p_announce = p_sd->p_sys->pp_announces[i];
/* FIXME: slow */
More information about the vlc-commits
mailing list