[vlc-commits] lua/vlc: vlc_sd_probe_Open: use vlc_dictionary_has_key
Filip Roséen
git at videolan.org
Thu May 18 18:09:43 CEST 2017
vlc | branch: master | Filip Roséen <filip at atch.se> | Thu May 18 12:19:31 2017 +0200| [773713d6c428b7e6dad98ae99524b6eafca4bc81] | committer: Rémi Denis-Courmont
lua/vlc: vlc_sd_probe_Open: use vlc_dictionary_has_key
As we are only checking whether the dictionary has a certain key (to
prevent loading the same thing twice), vlc_dictionary_has_key is
semantically more correct than vlc_dictionary_value_for_key.
Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=773713d6c428b7e6dad98ae99524b6eafca4bc81
---
modules/lua/vlc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/modules/lua/vlc.c b/modules/lua/vlc.c
index be7dbfd7e2..86d7332c1e 100644
--- a/modules/lua/vlc.c
+++ b/modules/lua/vlc.c
@@ -548,8 +548,7 @@ static int vlc_sd_probe_Open( vlc_object_t *obj )
if( temp )
*temp = '\0';
- if( vlc_dictionary_value_for_key( &name_d, *ppsz_file ) ==
- kVLCDictionaryNotFound )
+ if( !vlc_dictionary_has_key( &name_d, *ppsz_file ) )
vlc_dictionary_insert( &name_d, *ppsz_file, &name_d );
free( *ppsz_file );
}
More information about the vlc-commits
mailing list