pidgin: 18ddd668: Minor cleanup

markdoliner at pidgin.im markdoliner at pidgin.im
Thu Jun 17 17:11:03 EDT 2010


-----------------------------------------------------------------
Revision: 18ddd668ba1cc77ed0a0595a053f8a2879dddfd0
Ancestor: 874e9c9941d0587cc9a12f70910987a514f1cee3
Author: markdoliner at pidgin.im
Date: 2010-06-17T21:06:00
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/18ddd668ba1cc77ed0a0595a053f8a2879dddfd0

Modified files:
        libpurple/protocols/yahoo/libymsg.c

ChangeLog: 

Minor cleanup

-------------- next part --------------
============================================================
--- libpurple/protocols/yahoo/libymsg.c	5ab8f3bdabb7e62cf56623ed1d9f85e516a8aec4
+++ libpurple/protocols/yahoo/libymsg.c	ff966131fb334d1a9f45da8f4ab0767ef6db302a
@@ -401,15 +401,13 @@ static void yahoo_do_group_check(PurpleA
 	PurpleBuddy *b;
 	PurpleGroup *g;
 	GSList *list, *i;
-	gboolean onlist = 0;
-	char *oname = NULL;
-	char **oname_p = &oname;
-	GSList **list_p = &list;
+	gboolean onlist = FALSE;
+	char *oname;
 
-	if (!g_hash_table_lookup_extended(ht, purple_normalize(account, name), (gpointer *) oname_p, (gpointer *) list_p))
-		list = purple_find_buddies(account, name);
+	if (g_hash_table_lookup_extended(ht, purple_normalize(account, name), (gpointer *)&oname, (gpointer *)&list))
+		g_hash_table_steal(ht, oname);
 	else
-		g_hash_table_steal(ht, name);
+		list = purple_find_buddies(account, name);
 
 	for (i = list; i; i = i->next) {
 		b = i->data;
@@ -418,7 +416,7 @@ static void yahoo_do_group_check(PurpleA
 			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 @@ static void yahoo_do_group_check(PurpleA
 		if (!oname)
 			oname = g_strdup(purple_normalize(account, name));
 		g_hash_table_insert(ht, oname, list);
-	} else if (oname)
+	} else
 		g_free(oname);
 }
 


More information about the Commits mailing list