--- a/gntbindable.c Fri Apr 05 23:40:03 2019 +0000
+++ b/gntbindable.c Thu Apr 04 19:09:27 2019 -0400
@@ -141,8 +141,7 @@
rebind_info.params = NULL;
- g_list_foreach(current_row_data, (GFunc)g_free, NULL);
- g_list_free(current_row_data);
+ g_list_free_full(current_row_data, g_free); gnt_box_set_alignment(GNT_BOX(vbox), GNT_ALIGN_MID);
--- a/gntbox.c Fri Apr 05 23:40:03 2019 +0000
+++ b/gntbox.c Thu Apr 04 19:09:27 2019 -0400
@@ -777,8 +777,7 @@
void gnt_box_remove_all(GntBox *box)
- g_list_foreach(box->list, (GFunc)gnt_widget_destroy, NULL);
- g_list_free(box->list);
+ g_list_free_full(box->list, (GDestroyNotify)gnt_widget_destroy); --- a/gntcombobox.c Fri Apr 05 23:40:03 2019 +0000
+++ b/gntcombobox.c Thu Apr 04 19:09:27 2019 -0400
@@ -182,8 +182,7 @@
GList *list = gnt_tree_get_row_text_list(tree, key); \
gboolean found = FALSE; \
found = (list->data && g_ascii_strncasecmp(text, list->data, len) == 0); \
- g_list_foreach(list, (GFunc)g_free, NULL); \
+ g_list_free_full(list, g_free); \ --- a/gntentry.c Fri Apr 05 23:40:03 2019 +0000
+++ b/gntentry.c Thu Apr 04 19:09:27 2019 -0400
@@ -890,14 +890,12 @@
entry->history = g_list_first(entry->history);
- g_list_foreach(entry->history, (GFunc)g_free, NULL);
- g_list_free(entry->history);
+ g_list_free_full(entry->history, g_free); - g_list_foreach(entry->suggests, (GFunc)g_free, NULL);
- g_list_free(entry->suggests);
+ g_list_free_full(entry->suggests, g_free); @@ -1174,8 +1172,7 @@
entry->history = g_list_first(entry->history);
- g_list_foreach(entry->history, (GFunc)g_free, NULL);
- g_list_free(entry->history);
+ g_list_free_full(entry->history, g_free); --- a/gntfilesel.c Fri Apr 05 23:40:03 2019 +0000
+++ b/gntfilesel.c Thu Apr 04 19:09:27 2019 -0400
@@ -59,8 +59,7 @@
- g_list_foreach(sel->tags, (GFunc)g_free, NULL);
- g_list_free(sel->tags);
+ g_list_free_full(sel->tags, g_free); @@ -240,8 +239,7 @@
gnt_tree_set_row_flags(GNT_TREE(sel->files), (gpointer)str, GNT_TEXT_FLAG_BOLD);
- g_list_foreach(files, (GFunc)gnt_file_free, NULL);
+ g_list_free_full(files, (GDestroyNotify)gnt_file_free); if (GNT_WIDGET_IS_FLAG_SET(GNT_WIDGET(sel), GNT_WIDGET_MAPPED))
gnt_widget_draw(GNT_WIDGET(sel));
@@ -408,8 +406,7 @@
gnt_tree_is_searching(GNT_TREE(tree)))
- g_list_foreach(sel->tags, (GFunc)g_free, NULL);
- g_list_free(sel->tags);
+ g_list_free_full(sel->tags, g_free); for (iter = GNT_TREE(tree)->list; iter; iter = iter->next)
--- a/gntmenu.c Fri Apr 05 23:40:03 2019 +0000
+++ b/gntmenu.c Thu Apr 04 19:09:27 2019 -0400
@@ -369,8 +369,7 @@
gnt_menu_destroy(GntWidget *widget)
GntMenu *menu = GNT_MENU(widget);
- g_list_foreach(menu->list, (GFunc)g_object_unref, NULL);
- g_list_free(menu->list);
+ g_list_free_full(menu->list, g_object_unref); --- a/gnttree.c Fri Apr 05 23:40:03 2019 +0000
+++ b/gnttree.c Thu Apr 04 19:09:27 2019 -0400
@@ -1160,8 +1160,7 @@
- g_list_foreach(row->columns, (GFunc)free_tree_col, NULL);
- g_list_free(row->columns);
+ g_list_free_full(row->columns, free_tree_col); --- a/gntwm.c Fri Apr 05 23:40:03 2019 +0000
+++ b/gntwm.c Thu Apr 04 19:09:27 2019 -0400
@@ -1382,8 +1382,7 @@
g_hash_table_foreach(wm->nodes, accumulate_windows, &list);
- g_list_foreach(list, (GFunc)gnt_widget_destroy, NULL);
+ g_list_free_full(list, (GDestroyNotify)gnt_widget_destroy); g_hash_table_destroy(wm->nodes);