mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-05 02:36:19 +01:00
Merge branch 'coverity-fixes' into 'main'
gdesktopappinfo: Drop an unnecessary NULL check See merge request GNOME/glib!3173
This commit is contained in:
commit
8a3b16af23
@ -1253,6 +1253,8 @@ desktop_file_dir_unindexed_search (DesktopFileDir *dir,
|
|||||||
GHashTableIter iter;
|
GHashTableIter iter;
|
||||||
gpointer key, value;
|
gpointer key, value;
|
||||||
|
|
||||||
|
g_assert (search_token != NULL);
|
||||||
|
|
||||||
if (!dir->memory_index)
|
if (!dir->memory_index)
|
||||||
desktop_file_dir_unindexed_setup_search (dir);
|
desktop_file_dir_unindexed_setup_search (dir);
|
||||||
|
|
||||||
@ -1270,7 +1272,7 @@ desktop_file_dir_unindexed_search (DesktopFileDir *dir,
|
|||||||
p = strstr (key, search_token);
|
p = strstr (key, search_token);
|
||||||
if (p == NULL)
|
if (p == NULL)
|
||||||
continue;
|
continue;
|
||||||
else if (p == key && search_token != NULL && *search_token != '\0')
|
else if (p == key && *search_token != '\0')
|
||||||
match_type = MATCH_TYPE_PREFIX;
|
match_type = MATCH_TYPE_PREFIX;
|
||||||
else
|
else
|
||||||
match_type = MATCH_TYPE_SUBSTRING;
|
match_type = MATCH_TYPE_SUBSTRING;
|
||||||
|
Loading…
Reference in New Issue
Block a user