Changeset e0e7b2ef03e32657d347ad5ef039191a3d57cdd1

Show
Ignore:
Timestamp:
14/05/06 20:49:50 (3 years ago)
Author:
Clément Stenac <zorglub@videolan.org>
git-committer:
Clément Stenac <zorglub@videolan.org> 1147632590 +0000
git-parent:

[9835f07bb2cf049dc4ed2250a2bc35ae1a7f8f24]

git-author:
Clément Stenac <zorglub@videolan.org> 1147632590 +0000
Message:

Change some error message to assertions

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/playlist/tree.c

    red0b72e re0e7b2e  
    2222 *****************************************************************************/ 
    2323#include <vlc/vlc.h> 
     24#include <assert.h> 
    2425#include <vlc/input.h> 
    2526#include "vlc_playlist.h" 
     
    205206                         int i_position ) 
    206207{ 
    207    if( !p_parent || p_parent->i_children == -1 ) 
    208    { 
    209         msg_Err( p_playlist, "invalid node" ); 
    210         return VLC_EGENERIC; 
    211    } 
     208   assert( p_parent && p_parent->i_children != -1 ); 
    212209   if( i_position == -1 ) i_position = p_parent->i_children ; 
    213210 
     
    216213                i_position, 
    217214                p_item ); 
    218  
    219215   p_item->p_parent = p_parent; 
    220  
    221216   return VLC_SUCCESS; 
    222217} 
     
    347342#endif 
    348343 
    349     if( !p_root  || p_root->i_children == -1 ) 
    350     { 
    351         msg_Err( p_playlist,"invalid arguments for GetNextLeaf" ); 
    352         return NULL; 
    353     } 
     344    assert( p_root && p_root->i_children != -1 ); 
    354345 
    355346    /* Now, walk the tree until we find a suitable next item */ 
     
    382373#endif 
    383374 
    384     if( !p_root  || p_root->i_children == -1 ) 
    385     { 
    386         msg_Err( p_playlist,"invalid arguments for GetNextEnabledLeaf" ); 
    387         return NULL; 
    388     } 
     375    assert( p_root && p_root->i_children != -1 ); 
    389376 
    390377    /* Now, walk the tree until we find a suitable next item */ 
     
    426413                         p_root->p_input->psz_name ); 
    427414#endif 
    428  
    429     if( !p_root || p_root->i_children == -1 ) 
    430     { 
    431         msg_Err( p_playlist,"invalid arguments for GetPrevLeaf" ); 
    432         return NULL; 
    433     } 
     415    assert( p_root && p_root->i_children != -1 ); 
    434416 
    435417    /* Now, walk the tree until we find a suitable previous item */