diff libpurple/protocols/yahoo/libymsg.c @ 30213:597840eccfa7

merge of '0627a49f54e3d5317e6a8dd97956ee2abfa32f9d' and '8bc0a157fd0b23d8e7b6dc9b581fc636e9a0f258'
author Paul Aurich <paul@darkrain42.org>
date Fri, 18 Jun 2010 20:14:06 +0000
parents 490707649f29
children 3ae0814ae727
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/libymsg.c	Fri Jun 18 20:12:41 2010 +0000
+++ b/libpurple/protocols/yahoo/libymsg.c	Fri Jun 18 20:14:06 2010 +0000
@@ -401,15 +401,13 @@
 	PurpleBuddy *b;
 	PurpleGroup *g;
 	GSList *list, *i;
-	gboolean onlist = 0;
+	gboolean onlist = FALSE;
 	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))
+
+	if (g_hash_table_lookup_extended(ht, purple_normalize(account, name), (gpointer *)&oname, (gpointer *)&list))
+		g_hash_table_steal(ht, name);
+	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);
 }
 
@@ -843,12 +841,12 @@
 			default:
 				break;
 		}
-	
+
 		if (*stat == '1')
 			serv_got_typing(gc, fed_from, 0, PURPLE_TYPING);
 		else
 			serv_got_typing_stopped(gc, fed_from);
-		
+
 		if (fed_from != from)
 			g_free(fed_from);