[vlc-commits] asf: fix shadowing

Rémi Denis-Courmont git at videolan.org
Sat Nov 11 16:43:07 CET 2017


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Nov 11 17:42:49 2017 +0200| [92f2653dc1b1d6b7a6cbfe36140f14826947780d] | committer: Rémi Denis-Courmont

asf: fix shadowing

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=92f2653dc1b1d6b7a6cbfe36140f14826947780d
---

 modules/demux/asf/libasf.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/modules/demux/asf/libasf.c b/modules/demux/asf/libasf.c
index 3e61aa6f83..35d69c62fa 100644
--- a/modules/demux/asf/libasf.c
+++ b/modules/demux/asf/libasf.c
@@ -521,15 +521,16 @@ static int ASF_ReadObject_header_extension( stream_t *s, asf_object_t *p_obj )
 
     for( ; ; )
     {
-        asf_object_t *p_obj = malloc( sizeof( asf_object_t ) );
+        asf_object_t *p_child = malloc( sizeof( asf_object_t ) );
 
-        if( !p_obj || ASF_ReadObject( s, p_obj, (asf_object_t*)p_he ) )
+        if( p_child == NULL
+         || ASF_ReadObject( s, p_child, (asf_object_t*)p_he ) )
         {
-            free( p_obj );
+            free( p_child );
             break;
         }
 
-        if( ASF_NextObject( s, p_obj, 0 ) ) /* Go to the next object */
+        if( ASF_NextObject( s, p_child, 0 ) ) /* Go to the next object */
         {
             break;
         }



More information about the vlc-commits mailing list