Changeset 536386869cf05eedbd716c9c17a1b67204b0ef1f
- Timestamp:
- 02/13/08 23:09:00
(7 months ago)
- Author:
- Pierre d'Herbemont <pdherbemont@videolan.org>
- git-committer:
- Pierre d'Herbemont <pdherbemont@videolan.org> 1202940540 +0000
- git-parent:
[eef8d9d4ebb1c91b863bc3046037ff5e7a04e09e]
- git-author:
- Pierre d'Herbemont <pdherbemont@videolan.org> 1202940540 +0000
- Message:
vlc_arrays.h: More vlc_dictionary_t fixes.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r755df9f |
r5363868 |
|
| 432 | 432 | int i; |
|---|
| 433 | 433 | struct vlc_dictionary_entry_t * p_current, * p_next; |
|---|
| 434 | | for( i = 0; i < p_dict->i_size; i++ ) |
|---|
| 435 | | { |
|---|
| 436 | | p_current = p_dict->p_entries[i]; |
|---|
| 437 | | while( p_current ) |
|---|
| | 434 | if( p_dict->p_entries ) |
|---|
| | 435 | { |
|---|
| | 436 | for( i = 0; i < p_dict->i_size; i++ ) |
|---|
| 438 | 437 | { |
|---|
| 439 | | p_next = p_dict->p_entries[i]->p_next; |
|---|
| 440 | | free( p_dict->p_entries[i]->psz_key ); |
|---|
| 441 | | free( p_current ); |
|---|
| 442 | | p_current = p_next; |
|---|
| | 438 | p_current = p_dict->p_entries[i]; |
|---|
| | 439 | while( p_current ) |
|---|
| | 440 | { |
|---|
| | 441 | p_next = p_dict->p_entries[i]->p_next; |
|---|
| | 442 | free( p_dict->p_entries[i]->psz_key ); |
|---|
| | 443 | free( p_current ); |
|---|
| | 444 | p_current = p_next; |
|---|
| | 445 | } |
|---|
| 443 | 446 | } |
|---|
| 444 | | } |
|---|
| 445 | | free( p_dict->p_entries ); |
|---|
| | 447 | free( p_dict->p_entries ); |
|---|
| | 448 | } |
|---|
| 446 | 449 | p_dict->i_size = 0; |
|---|
| 447 | 450 | } |
|---|
| … | … | |
| 461 | 464 | return kVLCDictionaryNotFound; |
|---|
| 462 | 465 | |
|---|
| 463 | | /* Make sure we return the right item. (Hash collision) */ |
|---|
| | 466 | if( p_entry && !p_entry->p_next ) |
|---|
| | 467 | return p_entry->p_value; |
|---|
| | 468 | |
|---|
| | 469 | /* Make sure we return the right item. (Hash collision) */ |
|---|
| 464 | 470 | do { |
|---|
| 465 | 471 | if( !strcmp( psz_key, p_entry->psz_key ) ) |
|---|
| … | … | |
| 476 | 482 | struct vlc_dictionary_entry_t * p_entry; |
|---|
| 477 | 483 | int i, count = 0; |
|---|
| | 484 | |
|---|
| | 485 | if( !p_dict->p_entries ) |
|---|
| | 486 | return 0; |
|---|
| | 487 | |
|---|
| 478 | 488 | for( i = 0; i < p_dict->i_size; i++ ) |
|---|
| 479 | 489 | { |
|---|
| … | … | |
| 570 | 580 | vlc_dictionary_clear( p_dict ); |
|---|
| 571 | 581 | p_dict->i_size = new_dict.i_size; |
|---|
| 572 | | p_dict->p_entries= new_dict.p_entries; |
|---|
| | 582 | p_dict->p_entries = new_dict.p_entries; |
|---|
| 573 | 583 | } |
|---|
| 574 | 584 | } |
|---|