diff src/prpl.c @ 14035:8bda65b88e49

[gaim-migrate @ 16638] A bunch of small changes. Mostly remove "if not null" checks before calling g_free, g_list_free, g_slist_free and g_strdup. Also use g_list_foreach() to call g_free to free strings in an array. And some whitespace changes here and there. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 05 Aug 2006 08:27:39 +0000
parents 1ca4a579eb57
children cef7f6a93592
line wrap: on
line diff
--- a/src/prpl.c	Sat Aug 05 05:42:28 2006 +0000
+++ b/src/prpl.c	Sat Aug 05 08:27:39 2006 +0000
@@ -123,7 +123,7 @@
 gaim_prpl_got_user_status(GaimAccount *account, const char *name,
 		const char *status_id, ...)
 {
-	GSList *list, *iter;
+	GSList *list;
 	GaimBuddy *buddy;
 	GaimPresence *presence;
 	GaimStatus *status;
@@ -150,11 +150,7 @@
 	va_end(args);
 
 	list = gaim_find_buddies(account, name);
-	for (iter = list; iter != NULL; iter = iter->next)
-	{
-		buddy = (GaimBuddy *)iter->data;
-		gaim_blist_update_buddy_status(buddy, old_status);
-	}
+	g_slist_foreach(list, (GFunc)gaim_blist_update_buddy_status, old_status);
 	g_slist_free(list);
 
 	if (!gaim_status_is_online(status))