Changeset e0e7b2ef03e32657d347ad5ef039191a3d57cdd1
- 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
| red0b72e |
re0e7b2e |
|
| 22 | 22 | *****************************************************************************/ |
|---|
| 23 | 23 | #include <vlc/vlc.h> |
|---|
| | 24 | #include <assert.h> |
|---|
| 24 | 25 | #include <vlc/input.h> |
|---|
| 25 | 26 | #include "vlc_playlist.h" |
|---|
| … | … | |
| 205 | 206 | int i_position ) |
|---|
| 206 | 207 | { |
|---|
| 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 ); |
|---|
| 212 | 209 | if( i_position == -1 ) i_position = p_parent->i_children ; |
|---|
| 213 | 210 | |
|---|
| … | … | |
| 216 | 213 | i_position, |
|---|
| 217 | 214 | p_item ); |
|---|
| 218 | | |
|---|
| 219 | 215 | p_item->p_parent = p_parent; |
|---|
| 220 | | |
|---|
| 221 | 216 | return VLC_SUCCESS; |
|---|
| 222 | 217 | } |
|---|
| … | … | |
| 347 | 342 | #endif |
|---|
| 348 | 343 | |
|---|
| 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 ); |
|---|
| 354 | 345 | |
|---|
| 355 | 346 | /* Now, walk the tree until we find a suitable next item */ |
|---|
| … | … | |
| 382 | 373 | #endif |
|---|
| 383 | 374 | |
|---|
| 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 ); |
|---|
| 389 | 376 | |
|---|
| 390 | 377 | /* Now, walk the tree until we find a suitable next item */ |
|---|
| … | … | |
| 426 | 413 | p_root->p_input->psz_name ); |
|---|
| 427 | 414 | #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 ); |
|---|
| 434 | 416 | |
|---|
| 435 | 417 | /* Now, walk the tree until we find a suitable previous item */ |
|---|