playlist/Registry: use initializer instead of memset()

This commit is contained in:
Max Kellermann 2019-06-11 19:26:24 +02:00
parent d43ce8413a
commit 74380d2ae4

View File

@ -165,12 +165,10 @@ playlist_list_open_uri(const char *uri, Mutex &mutex)
{ {
/** this array tracks which plugins have already been tried by /** this array tracks which plugins have already been tried by
playlist_list_open_uri_scheme() */ playlist_list_open_uri_scheme() */
bool tried[n_playlist_plugins]; bool tried[n_playlist_plugins]{};
assert(uri != nullptr); assert(uri != nullptr);
memset(tried, false, sizeof(tried));
auto playlist = playlist_list_open_uri_scheme(uri, mutex, tried); auto playlist = playlist_list_open_uri_scheme(uri, mutex, tried);
if (playlist == nullptr) if (playlist == nullptr)
playlist = playlist_list_open_uri_suffix(uri, mutex, playlist = playlist_list_open_uri_suffix(uri, mutex,