Mercurial > pidgin
changeset 30204:33989e3a449b
Minor cleanup
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 17 Jun 2010 21:06:00 +0000 |
parents | 07f716427b50 |
children | 545ce15b619f |
files | libpurple/protocols/yahoo/libymsg.c |
diffstat | 1 files changed, 8 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/libymsg.c Thu Jun 17 21:04:40 2010 +0000 +++ b/libpurple/protocols/yahoo/libymsg.c Thu Jun 17 21:06:00 2010 +0000 @@ -401,15 +401,13 @@ PurpleBuddy *b; PurpleGroup *g; GSList *list, *i; - gboolean onlist = 0; - char *oname = NULL; - char **oname_p = &oname; - GSList **list_p = &list; - - if (!g_hash_table_lookup_extended(ht, purple_normalize(account, name), (gpointer *) oname_p, (gpointer *) list_p)) + gboolean onlist = FALSE; + char *oname; + + if (g_hash_table_lookup_extended(ht, purple_normalize(account, name), (gpointer *)&oname, (gpointer *)&list)) + g_hash_table_steal(ht, oname); + else list = purple_find_buddies(account, name); - else - g_hash_table_steal(ht, name); for (i = list; i; i = i->next) { b = i->data; @@ -418,7 +416,7 @@ purple_debug_misc("yahoo", "Oh good, %s is in the right group (%s).\n", name, group); list = g_slist_delete_link(list, i); - onlist = 1; + onlist = TRUE; break; } } @@ -438,7 +436,7 @@ if (!oname) oname = g_strdup(purple_normalize(account, name)); g_hash_table_insert(ht, oname, list); - } else if (oname) + } else g_free(oname); }