From 755df9f11da318666db6bbdb46323524f20ba8d6 Mon Sep 17 00:00:00 2001 From: Pierre d'Herbemont Date: Wed, 13 Feb 2008 19:06:43 +0000 Subject: [PATCH] vlc_arrays.h: Make sure we return the right value associated with a given key. --- include/vlc_arrays.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/include/vlc_arrays.h b/include/vlc_arrays.h index 12b245ec86..ca98074f00 100644 --- a/include/vlc_arrays.h +++ b/include/vlc_arrays.h @@ -457,13 +457,10 @@ vlc_dictionary_value_for_key( const vlc_dictionary_t * p_dict, const char * psz_ int i_pos = DictHash( psz_key, p_dict->i_size ); struct vlc_dictionary_entry_t * p_entry = p_dict->p_entries[i_pos]; - if( p_entry && !p_entry->p_next ) - return p_entry->p_value; - if( !p_entry ) return kVLCDictionaryNotFound; - /* Hash collision */ + /* Make sure we return the right item. (Hash collision) */ do { if( !strcmp( psz_key, p_entry->psz_key ) ) return p_entry->p_value; -- 2.39.2