Mercurial > pidgin
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 14034:0839a7b71325 | 14035:8bda65b88e49 |
|---|---|
| 121 | 121 |
| 122 void | 122 void |
| 123 gaim_prpl_got_user_status(GaimAccount *account, const char *name, | 123 gaim_prpl_got_user_status(GaimAccount *account, const char *name, |
| 124 const char *status_id, ...) | 124 const char *status_id, ...) |
| 125 { | 125 { |
| 126 GSList *list, *iter; | 126 GSList *list; |
| 127 GaimBuddy *buddy; | 127 GaimBuddy *buddy; |
| 128 GaimPresence *presence; | 128 GaimPresence *presence; |
| 129 GaimStatus *status; | 129 GaimStatus *status; |
| 130 GaimStatus *old_status; | 130 GaimStatus *old_status; |
| 131 va_list args; | 131 va_list args; |
| 148 va_start(args, status_id); | 148 va_start(args, status_id); |
| 149 gaim_status_set_active_with_attrs(status, TRUE, args); | 149 gaim_status_set_active_with_attrs(status, TRUE, args); |
| 150 va_end(args); | 150 va_end(args); |
| 151 | 151 |
| 152 list = gaim_find_buddies(account, name); | 152 list = gaim_find_buddies(account, name); |
| 153 for (iter = list; iter != NULL; iter = iter->next) | 153 g_slist_foreach(list, (GFunc)gaim_blist_update_buddy_status, old_status); |
| 154 { | |
| 155 buddy = (GaimBuddy *)iter->data; | |
| 156 gaim_blist_update_buddy_status(buddy, old_status); | |
| 157 } | |
| 158 g_slist_free(list); | 154 g_slist_free(list); |
| 159 | 155 |
| 160 if (!gaim_status_is_online(status)) | 156 if (!gaim_status_is_online(status)) |
| 161 serv_got_typing_stopped(gaim_account_get_connection(account), name); | 157 serv_got_typing_stopped(gaim_account_get_connection(account), name); |
| 162 } | 158 } |
