[vlc-commits] srt: remove tautology

Rémi Denis-Courmont git at videolan.org
Mon Jul 2 20:52:22 CEST 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jul  1 21:38:22 2018 +0300| [90b7919115cf2906e020a215a752d9137321f936] | committer: Rémi Denis-Courmont

srt: remove tautology

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

 modules/access_output/srt.c | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/modules/access_output/srt.c b/modules/access_output/srt.c
index 2b634746ec..c3fdce42b1 100644
--- a/modules/access_output/srt.c
+++ b/modules/access_output/srt.c
@@ -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();
 }



More information about the vlc-commits mailing list