[vlc-commits] zip: fix initialization order

Rémi Denis-Courmont git at videolan.org
Sun Jul 26 14:38:50 CEST 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jul 26 12:41:41 2015 +0300| [74e5edbff5195e3520ab1f958dd19361f37229bf] | committer: Rémi Denis-Courmont

zip: fix initialization order

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

 modules/access/zip/zipstream.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/modules/access/zip/zipstream.c b/modules/access/zip/zipstream.c
index 88e4d9a..9920c8c 100644
--- a/modules/access/zip/zipstream.c
+++ b/modules/access/zip/zipstream.c
@@ -182,9 +182,6 @@ int StreamOpen( vlc_object_t *p_this )
     if( !p_sys )
         return VLC_ENOMEM;
 
-    s->pf_read = Read;
-    s->pf_control = Control;
-
     p_sys->fileFunctions = ( zlib_filefunc_def * )
             calloc( 1, sizeof( zlib_filefunc_def ) );
     if( !p_sys->fileFunctions )
@@ -219,7 +216,8 @@ int StreamOpen( vlc_object_t *p_this )
     }
     p_sys->psz_path = s->psz_path;
     s->psz_path = psz_tmp;
-
+    s->pf_read = Read;
+    s->pf_control = Control;
     return VLC_SUCCESS;
 }
 



More information about the vlc-commits mailing list