vlc | branch: master | Filip Roséen <fi...@atch.se> | Wed Oct 12 20:08:08 2016 +0200| [f56e56f70afbfd90757d8bcc34dd1807b03b3de5] | committer: Jean-Baptiste Kempf
lib/vlm: narrow scope of variables used in loop Signed-off-by: Jean-Baptiste Kempf <j...@videolan.org> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f56e56f70afbfd90757d8bcc34dd1807b03b3de5 --- lib/vlm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/vlm.c b/lib/vlm.c index aecfca6..52aad85 100644 --- a/lib/vlm.c +++ b/lib/vlm.c @@ -196,9 +196,8 @@ static char* recurse_answer( vlm_message_t *p_answer, const char* psz_delim, char* psz_childdelim = NULL; char* psz_nametag = NULL; char* psz_response = strdup( "" ); - char *psz_tmp; int i_success = 0; - int i; + vlm_message_t *aw_child, **paw_child; i_success = asprintf( &psz_childdelim, "%s\t", psz_delim); @@ -208,8 +207,9 @@ static char* recurse_answer( vlm_message_t *p_answer, const char* psz_delim, paw_child = p_answer->child; aw_child = *( paw_child ); /* Iterate over children */ - for( i = 0; i < p_answer->i_child; i++ ) + for( int i = 0; i < p_answer->i_child; i++ ) { + char *psz_tmp; /* Spare comma if it is the last element */ char c_comma = ','; if( i == (p_answer->i_child - 1) ) _______________________________________________ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits