[gtk+] Don't use g_list_next in gtkselection.c
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Don't use g_list_next in gtkselection.c
- Date: Tue, 20 Oct 2015 10:16:24 +0000 (UTC)
commit b5d3bebae33e08ae388d28ed12649a85eea5a3f3
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Oct 19 19:18:06 2015 -0400
Don't use g_list_next in gtkselection.c
We generally access ->next directly.
gtk/gtkselection.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkselection.c b/gtk/gtkselection.c
index 9ad905b..3bbdcb0 100644
--- a/gtk/gtkselection.c
+++ b/gtk/gtkselection.c
@@ -628,9 +628,7 @@ gtk_target_table_new_from_list (GtkTargetList *list,
*n_targets = g_list_length (list->list);
targets = g_new0 (GtkTargetEntry, *n_targets);
- for (i = 0, tmp_list = list->list;
- i < *n_targets;
- i++, tmp_list = g_list_next (tmp_list))
+ for (tmp_list = list->list, i = 0; tmp_list; tmp_list = tmp_list->next, i++)
{
GtkTargetPair *pair = tmp_list->data;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]