From 3709475e8d743bf3c4e479900918ee87f938a2e3 Mon Sep 17 00:00:00 2001
From: Matthias Clasen <mclasen@redhat.com>
Date: Fri, 17 Jul 2015 15:54:40 -0400
Subject: [PATCH 3/7] gtkicontheme: Check a return value
We were already looking at the error anyway, but rewriting things
this way lets coverity see the light.
---
gtk/gtkicontheme.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c
index deb7035..68e33e2 100644
--- a/gtk/gtkicontheme.c
+++ b/gtk/gtkicontheme.c
@@ -1154,8 +1154,7 @@ insert_theme (GtkIconTheme *icon_theme,
{
theme_file = g_key_file_new ();
g_key_file_set_list_separator (theme_file, ',');
- g_key_file_load_from_file (theme_file, path, 0, &error);
- if (error)
+ if (!g_key_file_load_from_file (theme_file, path, 0, &error))
{
g_key_file_free (theme_file);
theme_file = NULL;
@@ -4093,7 +4092,7 @@ load_icon_thread (GTask *task,
{
GtkIconInfo *dup = task_data;
- icon_info_ensure_scale_and_pixbuf (dup);
+ (void)icon_info_ensure_scale_and_pixbuf (dup);
g_task_return_pointer (task, NULL, NULL);
}
--
2.4.5