--- a/pidgin/gtkaccount.c Sat Oct 12 22:49:37 2019 -0400 +++ b/pidgin/gtkaccount.c Sun Oct 13 15:45:39 2019 +0300 @@ -2222,10 +2222,9 @@ } } - for (l = purple_accounts_get_all(); l != NULL; l = l->next) { - ret = TRUE; - add_account_to_liststore((PurpleAccount *)l->data, global_buddyicon); - } + l = purple_accounts_get_all(); + ret = l != NULL; + g_list_foreach(l, (GFunc)add_account_to_liststore, global_buddyicon); if (global_buddyicon != NULL) g_object_unref(G_OBJECT(global_buddyicon)); @@ -2388,10 +2387,8 @@ global_buddyicon_changed(const char *name, PurplePrefType type, gconstpointer value, gpointer window) { - GList *list; - for (list = purple_accounts_get_all(); list; list = list->next) { - account_modified_cb(list->data, window); - } + GList *list = purple_accounts_get_all(); + g_list_foreach(list, (GFunc)account_modified_cb, window); } void