From b4fff5c46940c1393807a9b9f7f74a4170bba819 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Sun, 20 Aug 2017 20:45:20 +0100 Subject: libappstream-builder/utils: Drop an unreachable branch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There’s a precondition check for (search != NULL), so the function will hit an assertion failure before this branch. Coverity CID: 1454189 Signed-off-by: Philip Withnall --- libappstream-builder/asb-utils.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/libappstream-builder/asb-utils.c b/libappstream-builder/asb-utils.c index 2f547c4..a69cea2 100644 --- a/libappstream-builder/asb-utils.c +++ b/libappstream-builder/asb-utils.c @@ -633,10 +633,6 @@ asb_glob_value_search (GPtrArray *array, const gchar *search) g_return_val_if_fail (array != NULL, NULL); g_return_val_if_fail (search != NULL, NULL); - /* invalid */ - if (search == NULL) - return NULL; - for (i = 0; i < array->len; i++) { tmp = g_ptr_array_index (array, i); if (fnmatch (tmp->glob, search, 0) == 0) -- cgit v1.2.1