]> git.sesse.net Git - vlc/commitdiff
Remove useless test. At that point, p_sys is not NULL
authorJean-Baptiste Kempf <jb@videolan.org>
Wed, 1 Oct 2008 08:13:25 +0000 (01:13 -0700)
committerJean-Baptiste Kempf <jb@videolan.org>
Wed, 1 Oct 2008 08:13:25 +0000 (01:13 -0700)
modules/video_output/msw/direct3d.c
modules/video_output/msw/glwin32.c
modules/video_output/msw/wingdi.c

index 5591cbb59ee27b9c9e168df16fd91f78b2711600..ea02a4d5157953b18f959b0dd4b8f0aef00b5f68 100644 (file)
@@ -154,6 +154,7 @@ static int OpenVideo( vlc_object_t *p_this )
     p_vout->p_sys = malloc( sizeof( vout_sys_t ) );
     if( p_vout->p_sys == NULL )
         return VLC_ENOMEM;
+
     memset( p_vout->p_sys, 0, sizeof( vout_sys_t ) );
 
     if( VLC_SUCCESS != Direct3DVoutCreate( p_vout ) )
@@ -307,11 +308,8 @@ static void CloseVideo( vlc_object_t *p_this )
             p_vout->p_sys->i_spi_screensavetimeout, NULL, 0);
     }
 
-    if( p_vout->p_sys )
-    {
-        free( p_vout->p_sys );
-        p_vout->p_sys = NULL;
-    }
+    free( p_vout->p_sys );
+    p_vout->p_sys = NULL;
 }
 
 /*****************************************************************************
index f2c97ded2c47c977111900ea5c7734f921b0876c..bf49e2b40d1f61266879aec10a05f04bc68af528 100644 (file)
@@ -246,11 +246,8 @@ static void CloseVideo( vlc_object_t *p_this )
 
     vlc_mutex_destroy( &p_vout->p_sys->lock );
 
-    if( p_vout->p_sys )
-    {
-        free( p_vout->p_sys );
-        p_vout->p_sys = NULL;
-    }
+    free( p_vout->p_sys );
+    p_vout->p_sys = NULL;
 }
 
 /*****************************************************************************
index 73f560b27fa20bd168ea1ec82459cbc1265d0b47..874ed302e64b498ea700ae953649111dd41f9881 100644 (file)
@@ -358,11 +358,8 @@ static void CloseVideo ( vlc_object_t *p_this )
     FreeLibrary( p_vout->p_sys->gapi_dll );
 #endif
 
-    if( p_vout->p_sys )
-    {
-        free( p_vout->p_sys );
-        p_vout->p_sys = NULL;
-    }
+    free( p_vout->p_sys );
+    p_vout->p_sys = NULL;
 }
 
 /*****************************************************************************