[gtk+/gtk-3-16] list box: Remove unnecessary checks
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-16] list box: Remove unnecessary checks
- Date: Fri, 17 Jul 2015 23:26:56 +0000 (UTC)
commit 66f9dcd93b125f93a941a40453aac15f9f99c521
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Jul 17 18:40:11 2015 -0400
list box: Remove unnecessary checks
Again, coverity takes these as clues to complain.
gtk/gtklistbox.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtklistbox.c b/gtk/gtklistbox.c
index a4dfecf..d152439 100644
--- a/gtk/gtklistbox.c
+++ b/gtk/gtklistbox.c
@@ -2177,9 +2177,9 @@ gtk_list_box_update_header (GtkListBox *box,
return;
row = g_sequence_get (iter);
+ g_object_ref (row);
+
before_iter = gtk_list_box_get_previous_visible (box, iter);
- if (row)
- g_object_ref (row);
before_row = NULL;
if (before_iter != NULL)
{
@@ -2227,8 +2227,7 @@ gtk_list_box_update_header (GtkListBox *box,
}
if (before_row)
g_object_unref (before_row);
- if (row)
- g_object_unref (row);
+ g_object_unref (row);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]