[vlc-devel] commit: No need to set p_sys to NULL when the module is closed. ( Rémi Duraffort )

git version control git at videolan.org
Mon Jul 27 09:42:25 CEST 2009


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Fri Jul 24 16:38:49 2009 +0200| [99a2b5b7b0d8b74c27f47a6017e721ad7c3dbae6] | committer: Rémi Duraffort 

No need to set p_sys to NULL when the module is closed.

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

 modules/video_output/directfb.c    |    3 +--
 modules/video_output/msw/directx.c |    1 -
 2 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/modules/video_output/directfb.c b/modules/video_output/directfb.c
index 704404e..d250389 100644
--- a/modules/video_output/directfb.c
+++ b/modules/video_output/directfb.c
@@ -78,7 +78,7 @@ vlc_module_end ()
 static int Create( vlc_object_t *p_this )
 {
     vout_thread_t *p_vout = (vout_thread_t *)p_this;
-    vout_sys_t *p_sys = NULL;
+    vout_sys_t *p_sys;
     p_vout->pf_init = Init;
     p_vout->pf_end = End;
     p_vout->pf_manage = Manage;
@@ -263,7 +263,6 @@ static void Destroy( vlc_object_t *p_this )
 
     CloseDisplay( p_vout );
     free( p_sys );
-    p_sys = NULL;
 }
 
 static int Manage( vout_thread_t *p_vout )
diff --git a/modules/video_output/msw/directx.c b/modules/video_output/msw/directx.c
index fec0d39..ddccce9 100644
--- a/modules/video_output/msw/directx.c
+++ b/modules/video_output/msw/directx.c
@@ -438,7 +438,6 @@ static void CloseVideo( vlc_object_t *p_this )
     RestoreScreensaver( p_vout );
 
     free( p_vout->p_sys );
-    p_vout->p_sys = NULL;
 }
 
 /*****************************************************************************




More information about the vlc-devel mailing list