]> git.sesse.net Git - vlc/commitdiff
vlc_arrays.h: Make sure we return the right value associated with a given key.
authorPierre d'Herbemont <pdherbemont@videolan.org>
Wed, 13 Feb 2008 19:06:43 +0000 (19:06 +0000)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Wed, 13 Feb 2008 19:06:43 +0000 (19:06 +0000)
include/vlc_arrays.h

index 12b245ec8695f70f1eca10a05bf675e79288f040..ca98074f00feef2c4d6fd23cb13e69682a6c2465 100644 (file)
@@ -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;