changeset 22239:1ca7a70f1faa

Use the group passed into yahoo_add_buddy() instead of looking it up ourselves.
author Mark Doliner <mark@kingant.net>
date Thu, 31 Jan 2008 23:27:59 +0000
parents 4cc1dfbc499b
children 71e27bc2e82b
files libpurple/protocols/yahoo/yahoo.c
diffstat 1 files changed, 6 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/yahoo.c	Thu Jan 31 22:58:11 2008 +0000
+++ b/libpurple/protocols/yahoo/yahoo.c	Thu Jan 31 23:27:59 2008 +0000
@@ -3848,12 +3848,10 @@
 	yahoo_packet_send_and_free(pkt, yd);
 }
 
-/* XXX - What's the deal with PurpleGroup *foo? */
-static void yahoo_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *foo)
+static void yahoo_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *g)
 {
 	struct yahoo_data *yd = (struct yahoo_data *)gc->proto_data;
 	struct yahoo_packet *pkt;
-	PurpleGroup *g;
 	const char *group = NULL;
 	char *group2;
 	YahooFriend *f;
@@ -3867,15 +3865,11 @@
 
 	f = yahoo_friend_find(gc, purple_buddy_get_name(buddy));
 
-	if (foo)
-		group = foo->name;
-	if (!group) {
-		g = purple_buddy_get_group(buddy);
-		if (g)
-			group = g->name;
-		else
-			group = "Buddies";
-	}
+	g = purple_buddy_get_group(buddy);
+	if (g)
+		group = g->name;
+	else
+		group = "Buddies";
 
 	group2 = yahoo_string_encode(gc, group, NULL);
 	pkt = yahoo_packet_new(YAHOO_SERVICE_ADDBUDDY, YAHOO_STATUS_AVAILABLE, 0);