srt: remove tautology
authorRémi Denis-Courmont <remi@remlab.net>
Sun, 1 Jul 2018 18:38:22 +0000 (21:38 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Mon, 2 Jul 2018 17:09:25 +0000 (20:09 +0300)
modules/access_output/srt.c

index 2b63474..c3fdce4 100644 (file)
@@ -399,11 +399,8 @@ static int Open( vlc_object_t *p_this )
 failed:
     vlc_mutex_destroy( &p_sys->lock );
 
-    if ( p_sys != NULL )
-    {
-        if ( p_sys->sock != -1 ) srt_close( p_sys->sock );
-        if ( p_sys->i_poll_id != -1 ) srt_epoll_release( p_sys->i_poll_id );
-    }
+    if ( p_sys->sock != -1 ) srt_close( p_sys->sock );
+    if ( p_sys->i_poll_id != -1 ) srt_epoll_release( p_sys->i_poll_id );
 
     return VLC_EGENERIC;
 }
@@ -413,14 +410,11 @@ static void Close( vlc_object_t * p_this )
     sout_access_out_t     *p_access = (sout_access_out_t*)p_this;
     sout_access_out_sys_t *p_sys = p_access->p_sys;
 
-    if ( p_sys )
-    {
-        vlc_mutex_destroy( &p_sys->lock );
+    vlc_mutex_destroy( &p_sys->lock );
 
-        srt_epoll_remove_usock( p_sys->i_poll_id, p_sys->sock );
-        srt_close( p_sys->sock );
-        srt_epoll_release( p_sys->i_poll_id );
-    }
+    srt_epoll_remove_usock( p_sys->i_poll_id, p_sys->sock );
+    srt_close( p_sys->sock );
+    srt_epoll_release( p_sys->i_poll_id );
 
     srt_cleanup();
 }