# HG changeset patch # User Mark Doliner # Date 1276808760 0 # Node ID 33989e3a449b6a510d4d3e594ad7cff03fceec8c # Parent 07f716427b50c17cf5fcd57dd90e8d655120f053 Minor cleanup diff -r 07f716427b50 -r 33989e3a449b libpurple/protocols/yahoo/libymsg.c --- 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); }