]> git.sesse.net Git - vlc/commitdiff
stream: remove tautology
authorRémi Denis-Courmont <remi@remlab.net>
Mon, 25 Aug 2014 18:07:32 +0000 (21:07 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Mon, 25 Aug 2014 18:07:42 +0000 (21:07 +0300)
p_current cannot be NULL.

src/input/stream.c

index 42cd823bf5e1a918605278872610b24ebc7b8b7c..ba7bcee8a8d07b2e5f0311d60a8126da0e0b000e 100644 (file)
@@ -776,16 +776,13 @@ static int AStreamReadBlock( stream_t *s, void *p_read, unsigned int i_read )
         if( p_sys->block.i_offset >= p_sys->block.p_current->i_buffer )
         {
             /* Current block is now empty, switch to next */
-            if( p_sys->block.p_current )
-            {
-                p_sys->block.i_offset = 0;
-                p_sys->block.p_current = p_sys->block.p_current->p_next;
-            }
+            p_sys->block.i_offset = 0;
+            p_sys->block.p_current = p_sys->block.p_current->p_next;
+
             /*Get a new block if needed */
             if( !p_sys->block.p_current && AStreamRefillBlock( s ) )
-            {
                 break;
-            }
+            assert( p_sys->block.p_current );
         }
     }