From: Pierre d'Herbemont Date: Wed, 13 Feb 2008 19:06:43 +0000 (+0000) Subject: vlc_arrays.h: Make sure we return the right value associated with a given key. X-Git-Tag: 0.9.0-test0~2662 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=755df9f11da318666db6bbdb46323524f20ba8d6;p=vlc vlc_arrays.h: Make sure we return the right value associated with a given key. --- 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;