diff libpurple/protocols/qq/buddy_opt.c @ 30863:351d07aefb09

Kill off many dead assignments and any useless remaining variables. I think some of those QQ ones were actual logic errors, too. Let me know if there were any side-effects that were cut.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Mon, 23 Aug 2010 00:52:24 +0000
parents f1437342cc0e
children 6854cca5e2f7
line wrap: on
line diff
--- a/libpurple/protocols/qq/buddy_opt.c	Sun Aug 22 22:15:38 2010 +0000
+++ b/libpurple/protocols/qq/buddy_opt.c	Mon Aug 23 00:52:24 2010 +0000
@@ -262,7 +262,6 @@
 
 void qq_process_auth_code(PurpleConnection *gc, guint8 *data, gint data_len, guint32 uid)
 {
-	qq_data *qd;
 	gint bytes;
 	guint8 cmd, reply;
 	guint16 sub_cmd;
@@ -272,8 +271,6 @@
 	g_return_if_fail(data != NULL && data_len != 0);
 	g_return_if_fail(uid != 0);
 
-	qd = (qq_data *) gc->proto_data;
-
 	qq_show_packet("qq_process_auth_code", data, data_len);
 	bytes = 0;
 	bytes += qq_get8(&cmd, data + bytes);
@@ -400,7 +397,6 @@
 
 void qq_process_question(PurpleConnection *gc, guint8 *data, gint data_len, guint32 uid)
 {
-	qq_data *qd;
 	gint bytes;
 	guint8 cmd, reply;
 	gchar *question, *answer;
@@ -409,8 +405,6 @@
 
 	g_return_if_fail(data != NULL && data_len != 0);
 
-	qd = (qq_data *) gc->proto_data;
-
 	qq_show_packet("qq_process_question", data, data_len);
 	bytes = 0;
 	bytes += qq_get8(&cmd, data + bytes);
@@ -720,13 +714,10 @@
 /*  process reply to add_buddy_auth request */
 void qq_process_add_buddy_auth(guint8 *data, gint data_len, PurpleConnection *gc)
 {
-	qq_data *qd;
 	gchar **segments, *msg_utf8;
 
 	g_return_if_fail(data != NULL && data_len != 0);
 
-	qd = (qq_data *) gc->proto_data;
-
 	if (data[0] == '0') {
 		purple_debug_info("QQ", "Reply OK for sending authorize\n");
 		return;
@@ -767,11 +758,9 @@
 /* process the server reply for my request to remove myself from a buddy */
 void qq_process_buddy_remove_me(PurpleConnection *gc, guint8 *data, gint data_len, guint32 uid)
 {
-	qq_data *qd;
 	gchar *msg;
 
 	g_return_if_fail(data != NULL && data_len != 0);
-	qd = (qq_data *) gc->proto_data;
 
 	if (data[0] == 0) {
 		purple_debug_info("QQ", "Reply OK for removing me from %u's buddy list\n", uid);
@@ -1004,7 +993,6 @@
 
 void qq_process_buddy_check_code(PurpleConnection *gc, guint8 *data, gint data_len)
 {
-	qq_data *qd;
 	gint bytes;
 	guint8 cmd;
 	guint8 reply;
@@ -1013,8 +1001,6 @@
 
 	g_return_if_fail(data != NULL && data_len >= 5);
 
-	qd = (qq_data *) gc->proto_data;
-
 	qq_show_packet("buddy_check_code", data, data_len);
 
 	bytes = 0;