[vlc-commits] stream: remove redundant checks

Rémi Denis-Courmont git at videolan.org
Thu Jun 26 17:36:23 CEST 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jun 26 18:34:53 2014 +0300| [01db92aa6834bc642427fec9125faf6fc8783089] | committer: Rémi Denis-Courmont

stream: remove redundant checks

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

 src/input/stream.c        |    5 +----
 src/input/stream_filter.c |    6 ++----
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/src/input/stream.c b/src/input/stream.c
index 734fcf0..d5bb61f 100644
--- a/src/input/stream.c
+++ b/src/input/stream.c
@@ -1857,10 +1857,7 @@ static int AStreamReadDir( stream_t *s, input_item_node_t *p_node )
 {
     access_t *p_access = s->p_sys->p_access;
 
-    if( p_access->pf_readdir != NULL )
-        return p_access->pf_readdir( p_access, p_node );
-    else
-        return VLC_ENOITEM;
+    return p_access->pf_readdir( p_access, p_node );
 }
 
 /**
diff --git a/src/input/stream_filter.c b/src/input/stream_filter.c
index 47fc514..368b56d 100644
--- a/src/input/stream_filter.c
+++ b/src/input/stream_filter.c
@@ -130,8 +130,6 @@ static void StreamDelete( stream_t *s )
 
 int stream_FilterDefaultReadDir( stream_t *s, input_item_node_t *p_node )
 {
-    if( s != NULL && s->p_source != NULL )
-        return stream_ReadDir( s->p_source, p_node );
-    else
-        return VLC_ENOITEM;
+    assert( s->p_source != NULL );
+    return stream_ReadDir( s->p_source, p_node );
 }



More information about the vlc-commits mailing list