changeset 14629:6b8bc59414f0

[gaim-migrate @ 17375] Get rid of these useless checks. committer: Tailor Script <tailor@pidgin.im>
author Mark Huetsch <markhuetsch>
date Tue, 26 Sep 2006 22:54:24 +0000
parents 58202142e9ad
children 275c84b1b2a4
files libgaim/protocols/qq/buddy_info.c libgaim/protocols/qq/buddy_list.c libgaim/protocols/qq/buddy_opt.c libgaim/protocols/qq/buddy_status.c libgaim/protocols/qq/file_trans.c libgaim/protocols/qq/group.c libgaim/protocols/qq/group_conv.c libgaim/protocols/qq/group_find.c libgaim/protocols/qq/group_im.c libgaim/protocols/qq/group_info.c libgaim/protocols/qq/group_internal.c libgaim/protocols/qq/group_join.c libgaim/protocols/qq/group_network.c libgaim/protocols/qq/group_opt.c libgaim/protocols/qq/group_search.c libgaim/protocols/qq/im.c libgaim/protocols/qq/keep_alive.c libgaim/protocols/qq/login_logout.c libgaim/protocols/qq/qq.c libgaim/protocols/qq/recv_core.c libgaim/protocols/qq/send_core.c libgaim/protocols/qq/send_file.c libgaim/protocols/qq/sendqueue.c libgaim/protocols/qq/sys_msg.c
diffstat 24 files changed, 74 insertions(+), 184 deletions(-) [+]
line wrap: on
line diff
--- a/libgaim/protocols/qq/buddy_info.c	Tue Sep 26 21:37:37 2006 +0000
+++ b/libgaim/protocols/qq/buddy_info.c	Tue Sep 26 22:54:24 2006 +0000
@@ -235,7 +235,7 @@
 	gchar uid_str[11];
 	qq_info_query *query;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL && uid != 0);
+	g_return_if_fail(uid != 0);
 
 	qd = (qq_data *) gc->proto_data;
 	g_snprintf(uid_str, sizeof(uid_str), "%d", uid);
@@ -272,7 +272,7 @@
 	gint i;
 	guint8 *raw_data, *cursor, bar;
 
-	g_return_if_fail(gc != NULL && segments != NULL);
+	g_return_if_fail(segments != NULL);
 
 	bar = 0x1f;
 	raw_data = g_newa(guint8, MAX_PACKET_SIZE - 128);
@@ -489,7 +489,6 @@
 	gint len;
 	guint8 *data;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
 	g_return_if_fail(buf != NULL && buf_len != 0);
 
 	qd = (qq_data *) gc->proto_data;
@@ -515,7 +514,6 @@
 	qq_buddy *q_bud;
 	gchar *alias_utf8;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
 	qd = (qq_data *) gc->proto_data;
 
 	alias_utf8 = qq_to_utf8(info->nick, QQ_CHARSET_DEFAULT);
@@ -550,7 +548,6 @@
 	GList *list, *query_list;
 	GString *info_text;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
 	g_return_if_fail(buf != NULL && buf_len != 0);
 
 	qd = (qq_data *) gc->proto_data;
--- a/libgaim/protocols/qq/buddy_list.c	Tue Sep 26 21:37:37 2006 +0000
+++ b/libgaim/protocols/qq/buddy_list.c	Tue Sep 26 22:54:24 2006 +0000
@@ -62,8 +62,6 @@
 	qq_data *qd;
 	guint8 *raw_data, *cursor;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
-
 	qd = (qq_data *) gc->proto_data;
 	raw_data = g_newa(guint8, 5);
 	cursor = raw_data;
@@ -91,8 +89,6 @@
 	guint8 *raw_data, *cursor;
 	gint data_len;
 
-	g_return_if_fail(gc != NULL);
-
 	data_len = 3;
 	raw_data = g_newa(guint8, data_len);
 	cursor = raw_data;
@@ -114,8 +110,6 @@
 	guint8 *raw_data, *cursor;
 	gint data_len;
 
-	g_return_if_fail(gc != NULL);
-
 	data_len = 10;
 	raw_data = g_newa(guint8, data_len);
 	cursor = raw_data;
@@ -159,7 +153,6 @@
 	qq_buddy *q_bud;
 	qq_friends_online_entry *fe;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
 	g_return_if_fail(buf != NULL && buf_len != 0);
 
 	qd = (qq_data *) gc->proto_data;
@@ -259,7 +252,6 @@
 	gchar *name;
 	GaimBuddy *b;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
 	g_return_if_fail(buf != NULL && buf_len != 0);
 
 	qd = (qq_data *) gc->proto_data;
@@ -354,7 +346,6 @@
 	guint8 type, groupid;
 	qq_group *group;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
 	g_return_if_fail(buf != NULL && buf_len != 0);
 
 	qd = (qq_data *) gc->proto_data;
--- a/libgaim/protocols/qq/buddy_opt.c	Tue Sep 26 21:37:37 2006 +0000
+++ b/libgaim/protocols/qq/buddy_opt.c	Tue Sep 26 22:54:24 2006 +0000
@@ -61,7 +61,7 @@
 {
 	gchar uid_str[11];
 
-	g_return_if_fail(gc != NULL && uid > 0);
+	g_return_if_fail(uid > 0);
 
 	g_snprintf(uid_str, sizeof(uid_str), "%d", uid);
 	qq_send_cmd(gc, QQ_CMD_DEL_FRIEND, TRUE, 0, 
@@ -73,7 +73,7 @@
 {
 	guint8 *raw_data, *cursor;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL && uid > 0);
+	g_return_if_fail(uid > 0);
 
 	raw_data = g_newa(guint8, 4);
 	cursor = raw_data;
@@ -89,7 +89,7 @@
 	qq_add_buddy_request *req;
 	gchar uid_str[11];
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL && uid > 0);
+	g_return_if_fail(uid > 0);
 
 	/* we need to send the ascii code of this uid to qq server */
 	g_snprintf(uid_str, sizeof(uid_str), "%d", uid);
@@ -110,7 +110,7 @@
 	gchar *text_qq, uid_str[11];
 	guint8 bar, *cursor, *raw_data;
 
-	g_return_if_fail(gc != NULL && uid != 0);
+	g_return_if_fail(uid != 0);
 
 	g_snprintf(uid_str, sizeof(uid_str), "%d", uid);
 	bar = 0x1f;
@@ -139,7 +139,7 @@
 
 	gc = g->gc;
 	uid = g->uid;
-	g_return_if_fail(gc != NULL && uid != 0);
+	g_return_if_fail(uid != 0);
 
 	_qq_send_packet_buddy_auth(gc, uid, QQ_MY_AUTH_REQUEST, text);
 	g_free(g);
@@ -155,7 +155,7 @@
 
 	gc = g->gc;
 	uid = g->uid;
-	g_return_if_fail(gc != NULL && uid != 0);
+	g_return_if_fail(uid != 0);
 
 	_qq_send_packet_buddy_auth(gc, uid, QQ_MY_AUTH_REJECT, reason);
 	g_free(g);
@@ -171,7 +171,7 @@
 
 	gc = g->gc;
 	uid = g->uid;
-	g_return_if_fail(gc != NULL && uid != 0);
+	g_return_if_fail(uid != 0);
 
 	_qq_send_packet_buddy_auth(gc, uid, QQ_MY_AUTH_APPROVE, NULL);
 	g_free(g);
@@ -194,7 +194,7 @@
 
 	gc = g->gc;
 	uid = g->uid;
-	g_return_if_fail(gc != NULL && uid != 0);
+	g_return_if_fail(uid != 0);
 
 	g_free(g);
 
@@ -219,7 +219,7 @@
 
 	gc = g->gc;
 	uid = g->uid;
-	g_return_if_fail(gc != NULL && uid != 0);
+	g_return_if_fail(uid != 0);
 
 	_qq_send_packet_add_buddy(gc, uid);
 	g_free(g);
@@ -236,7 +236,7 @@
 
 	gc = g->gc;
 	uid = g->uid;
-	g_return_if_fail(gc != NULL && uid > 0);
+	g_return_if_fail(uid > 0);
 
 	buddy.name = uid_to_gaim_name(uid);
 	group.name = GAIM_GROUP_QQ_BLOCKED;
@@ -253,7 +253,6 @@
 	guint8 *data, *cursor, reply;
 	gchar **segments, *msg_utf8;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
 	g_return_if_fail(buf != NULL && buf_len != 0);
 
 	qd = (qq_data *) gc->proto_data;
@@ -285,7 +284,6 @@
 	gint len;
 	guint8 *data, *cursor, reply;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
 	g_return_if_fail(buf != NULL && buf_len != 0);
 
 	qd = (qq_data *) gc->proto_data;
@@ -314,7 +312,6 @@
 	gint len;
 	guint8 *data, *cursor, reply;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
 	g_return_if_fail(buf != NULL && buf_len != 0);
 
 	qd = (qq_data *) gc->proto_data;
@@ -347,7 +344,6 @@
 	gc_and_uid *g;
 	qq_add_buddy_request *req;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
 	g_return_if_fail(buf != NULL && buf_len != 0);
 
 	for_uid = 0;
@@ -442,8 +438,6 @@
 	qq_buddy *q_bud;
 	gchar *name, *group_name;
 
-	g_return_val_if_fail(gc != NULL && gc->proto_data != NULL, NULL);
-
 	a = gc->account;
 	qd = (qq_data *) gc->proto_data;
 	g_return_val_if_fail(a != NULL && uid != 0, NULL);
@@ -492,8 +486,6 @@
 	guint32 uid;
 	GaimBuddy *b;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
-
 	qd = (qq_data *) gc->proto_data;
 	if (!qd->logged_in)
 		return;		/* IMPORTANT ! */
@@ -519,8 +511,6 @@
 	qq_buddy *q_bud;
 	guint32 uid;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
-
 	qd = (qq_data *) gc->proto_data;
 	uid = gaim_name_to_uid(buddy->name);
 
@@ -551,8 +541,6 @@
 	gint i;
 	qq_add_buddy_request *p;
 
-	g_return_if_fail(qd != NULL);
-
 	i = 0;
 	while (qd->add_buddy_request) {
 		p = (qq_add_buddy_request *) (qd->add_buddy_request->data);
@@ -571,8 +559,6 @@
 	gchar *name;
 	GaimBuddy *b;
 
-	g_return_if_fail(qd != NULL);
-
 	i = 0;
 	while (qd->buddies) {
 		p = (qq_buddy *) (qd->buddies->data);
--- a/libgaim/protocols/qq/buddy_status.c	Tue Sep 26 21:37:37 2006 +0000
+++ b/libgaim/protocols/qq/buddy_status.c	Tue Sep 26 22:54:24 2006 +0000
@@ -118,8 +118,6 @@
 	GaimAccount *account;
 	GaimPresence *presence; 
 
-	g_return_val_if_fail(gc != NULL && gc->proto_data != NULL, 2);
-
 	account = gaim_connection_get_account(gc);
 	presence = gaim_account_get_presence(account);
 
@@ -144,8 +142,6 @@
 	GaimAccount *account;
 	GaimPresence *presence; 
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
-
 	account = gaim_connection_get_account(gc);
 	presence = gaim_account_get_presence(account);
 
@@ -189,7 +185,6 @@
 	qq_buddy *q_bud;
 	gchar *name;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
 	g_return_if_fail(buf != NULL && buf_len != 0);
 
 	qd = (qq_data *) gc->proto_data;
@@ -226,7 +221,6 @@
 	qq_buddy_status *s;
 	gchar *name;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
 	g_return_if_fail(buf != NULL && buf_len != 0);
 
 	qd = (qq_data *) gc->proto_data;
--- a/libgaim/protocols/qq/file_trans.c	Tue Sep 26 21:37:37 2006 +0000
+++ b/libgaim/protocols/qq/file_trans.c	Tue Sep 26 22:54:24 2006 +0000
@@ -256,9 +256,8 @@
 	qq_data *qd;
 	ft_info *info;
 
-	g_return_val_if_fail(gc != NULL && gc->proto_data != NULL, -1);
 	qd = (qq_data *) gc->proto_data;
-	g_return_val_if_fail(qd != NULL && qd->session_key != NULL, -1);
+	g_return_val_if_fail(qd->session_key != NULL, -1);
 	info = (ft_info *) qd->xfer->data;
 	bytes = 0;
 
@@ -289,7 +288,6 @@
 	time_t now;
 	ft_info *info;
 	
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
 	qd = (qq_data *) gc->proto_data;
 	info = (ft_info *) qd->xfer->data;
 
@@ -395,7 +393,6 @@
 	qq_data *qd;
 	ft_info *info;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
 	qd = (qq_data *) gc->proto_data;
 	info = (ft_info *) qd->xfer->data;
 
@@ -820,7 +817,6 @@
 	qq_file_header fh;
 	qq_data *qd;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
 	qd = (qq_data *) gc->proto_data;
 
 	cursor = data;
--- a/libgaim/protocols/qq/group.c	Tue Sep 26 21:37:37 2006 +0000
+++ b/libgaim/protocols/qq/group.c	Tue Sep 26 22:54:24 2006 +0000
@@ -37,7 +37,7 @@
 {
 	guint32 external_group_id;
 
-	g_return_if_fail(gc != NULL && input != NULL);
+	g_return_if_fail(input != NULL);
 	external_group_id = qq_string_to_dec_value(input);
 	/* 0x00000000 means search for demo group */
 	qq_send_cmd_group_search_group(gc, external_group_id);
@@ -46,7 +46,6 @@
 static void _qq_group_search_cancel_callback(GaimConnection *gc, const gchar *input)
 {
 	qq_data *qd;
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
 
 	qd = (qq_data *) gc->proto_data;
 	gaim_roomlist_set_in_progress(qd->roomlist, FALSE);
@@ -88,7 +87,6 @@
 	GaimRoomlist *rl;
 	GaimRoomlistField *f;
 
-	g_return_val_if_fail(gc != NULL && gc->proto_data != NULL, NULL);
 	qd = (qq_data *) gc->proto_data;
 
 	fields = NULL;
@@ -136,9 +134,7 @@
 	g_return_if_fail(list != NULL);
 	gc = gaim_account_get_connection(list->account);
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
 	qd = (qq_data *) gc->proto_data;
-
 	gaim_roomlist_set_in_progress(list, FALSE);
 	gaim_roomlist_unref(list);
 }
@@ -153,10 +149,8 @@
 	GaimBlistNode *node;
 	qq_group *group;
 
-	g_return_if_fail(gc != NULL);
 	account = gaim_connection_get_account(gc);
 
-
 	gaim_group = gaim_find_group(GAIM_GROUP_QQ_QUN);
 	if (gaim_group == NULL) {
 		gaim_debug(GAIM_DEBUG_INFO, "QQ", "We have no QQ Qun\n");
--- a/libgaim/protocols/qq/group_conv.c	Tue Sep 26 21:37:37 2006 +0000
+++ b/libgaim/protocols/qq/group_conv.c	Tue Sep 26 22:54:24 2006 +0000
@@ -34,7 +34,7 @@
 	GaimConversation *conv;
 	qq_data *qd;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL && group != NULL);
+	g_return_if_fail(group != NULL);
 	qd = (qq_data *) gc->proto_data;
 
 	conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, 
@@ -51,7 +51,7 @@
 	gchar *member_name;
 	GaimConversation *conv;
 	gint flag;
-	g_return_if_fail(gc != NULL && group != NULL);
+	g_return_if_fail(group != NULL);
 
 	names = NULL;
 	flags = NULL;
--- a/libgaim/protocols/qq/group_find.c	Tue Sep 26 21:37:37 2006 +0000
+++ b/libgaim/protocols/qq/group_find.c	Tue Sep 26 22:54:24 2006 +0000
@@ -37,8 +37,6 @@
 	qq_data *qd;
 	group_packet *p;
 
-	g_return_val_if_fail(gc != NULL && gc->proto_data != NULL, FALSE);
-
 	if (internal_group_id == NULL)
 		return FALSE;
 	qd = (qq_data *) gc->proto_data;
@@ -100,7 +98,7 @@
 {
 	qq_buddy *member, *q_bud;
 	GaimBuddy *buddy;
-	g_return_val_if_fail(gc != NULL && group != NULL && member_uid > 0, NULL);
+	g_return_val_if_fail(group != NULL && member_uid > 0, NULL);
 
 	member = qq_group_find_member_by_uid(group, member_uid);
 	if (member == NULL) {	/* first appear during my session */
@@ -128,7 +126,6 @@
 	qq_group *group;
 	GList *list;
 
-	g_return_val_if_fail(gc != NULL && gc->proto_data != NULL, NULL);
 	qd = (qq_data *) gc->proto_data;
 
 	conv = gaim_find_chat(gc, channel);
@@ -153,7 +150,6 @@
 	qq_group *group;
 	qq_data *qd;
 
-	g_return_val_if_fail(gc != NULL && gc->proto_data != NULL, NULL);
 	qd = (qq_data *) gc->proto_data;
 
 	if (qd->groups == NULL || id <= 0)
--- a/libgaim/protocols/qq/group_im.c	Tue Sep 26 21:37:37 2006 +0000
+++ b/libgaim/protocols/qq/group_im.c	Tue Sep 26 22:54:24 2006 +0000
@@ -58,7 +58,7 @@
 	guint16 msg_len;
 	gchar *msg_filtered;
 
-	g_return_if_fail(gc != NULL && group != NULL && msg != NULL);
+	g_return_if_fail(group != NULL && msg != NULL);
 
 	msg_filtered = gaim_markup_strip_html(msg);
 	msg_len = strlen(msg_filtered);
@@ -102,7 +102,7 @@
 	gchar *reason_utf8, *msg, *reason;
 	group_member_opt *g;
 
-	g_return_if_fail(gc != NULL && internal_group_id > 0 && data != NULL && len > 0);
+	g_return_if_fail(internal_group_id > 0 && data != NULL && len > 0);
 
 	if (*cursor >= (data + len - 1)) {
 		gaim_debug(GAIM_DEBUG_WARNING, "QQ", "Received group msg apply_join is empty\n");
@@ -150,7 +150,7 @@
 	gchar *reason_utf8, *msg, *reason;
 	qq_group *group;
 
-	g_return_if_fail(gc != NULL && data != NULL && len > 0);
+	g_return_if_fail(data != NULL && len > 0);
 
 	if (*cursor >= (data + len - 1)) {
 		gaim_debug(GAIM_DEBUG_WARNING, "QQ", "Received group msg been_rejected is empty\n");
@@ -191,7 +191,7 @@
 	gchar *reason_utf8, *msg;
 	qq_group *group;
 
-	g_return_if_fail(gc != NULL && data != NULL && len > 0);
+	g_return_if_fail(data != NULL && len > 0);
 
 	if (*cursor >= (data + len - 1)) {
 		gaim_debug(GAIM_DEBUG_WARNING, "QQ", "Received group msg been_approved is empty\n");
@@ -230,7 +230,7 @@
 	gchar *msg;
 	qq_group *group;
 
-	g_return_if_fail(gc != NULL && data != NULL && len > 0);
+	g_return_if_fail(data != NULL && len > 0);
 
 	if (*cursor >= (data + len - 1)) {
 		gaim_debug(GAIM_DEBUG_WARNING, "QQ", "Received group msg been_removed is empty\n");
@@ -264,7 +264,7 @@
 	qq_group *group;
 	gchar *msg;
 
-	g_return_if_fail(gc != NULL && data != NULL && len > 0);
+	g_return_if_fail(data != NULL && len > 0);
 
 	if (*cursor >= (data + len - 1)) {
 		gaim_debug(GAIM_DEBUG_WARNING, "QQ", "Received group msg been_added is empty\n");
@@ -309,7 +309,7 @@
 	qq_recv_group_im *im_group;
 	gint skip_len;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL && data != NULL && data_len > 0);
+	g_return_if_fail(data != NULL && data_len > 0);
 	qd = (qq_data *) gc->proto_data;
 
 	gaim_debug(GAIM_DEBUG_INFO, "QQ",
--- a/libgaim/protocols/qq/group_info.c	Tue Sep 26 21:37:37 2006 +0000
+++ b/libgaim/protocols/qq/group_info.c	Tue Sep 26 22:54:24 2006 +0000
@@ -64,7 +64,7 @@
 	guint8 *raw_data, *cursor;
 	gint bytes, data_len;
 
-	g_return_if_fail(gc != NULL && group != NULL);
+	g_return_if_fail(group != NULL);
 
 	data_len = 5;
 	raw_data = g_newa(guint8, data_len);
@@ -87,7 +87,7 @@
 	guint8 *raw_data, *cursor;
 	gint bytes, data_len;
 
-	g_return_if_fail(gc != NULL && group != NULL);
+	g_return_if_fail(group != NULL);
 
 	/* only get online members when conversation window is on */
 	if (NULL == gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT,group->group_name_utf8, gaim_connection_get_account(gc))) {
@@ -119,7 +119,7 @@
 	GList *list;
 	qq_buddy *member;
 
-	g_return_if_fail(gc != NULL && group != NULL);
+	g_return_if_fail(group != NULL);
 	for (i = 0, list = group->members; list != NULL; list = list->next) {
 		member = (qq_buddy *) list->data;
 		if (_is_group_member_need_update_info(member))
@@ -168,7 +168,6 @@
 	guint32 unknown4;
 	guint8 unknown1;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
 	g_return_if_fail(data != NULL && len > 0);
 	qd = (qq_data *) gc->proto_data;
 
@@ -250,7 +249,7 @@
 	qq_group *group;
 	qq_buddy *member;
 
-	g_return_if_fail(gc != NULL && data != NULL && len > 0);
+	g_return_if_fail(data != NULL && len > 0);
 
 	if (data + len - *cursor < 4) {
 		gaim_debug(GAIM_DEBUG_ERROR, "QQ", "Invalid group online member reply, discard it!\n");
@@ -296,7 +295,7 @@
 	qq_group *group;
 	qq_buddy *member;
 
-	g_return_if_fail(gc != NULL && data != NULL && len > 0);
+	g_return_if_fail(data != NULL && len > 0);
 
 	read_packet_dw(data, cursor, len, &internal_group_id);
 	g_return_if_fail(internal_group_id > 0);
--- a/libgaim/protocols/qq/group_internal.c	Tue Sep 26 21:37:37 2006 +0000
+++ b/libgaim/protocols/qq/group_internal.c	Tue Sep 26 22:54:24 2006 +0000
@@ -76,7 +76,6 @@
         qq_group *group;
         qq_data *qd;
 
-        g_return_val_if_fail(gc != NULL && gc->proto_data != NULL, NULL);
         g_return_val_if_fail(internal_id > 0, NULL);
         qd = (qq_data *) gc->proto_data;
 
@@ -104,7 +103,6 @@
 {
         qq_group *group;
         GList *list;
-        g_return_if_fail(qd != NULL);
 
         list = qd->groups;
         while (list != NULL) {
@@ -148,7 +146,6 @@
 	qq_data *qd;
 	qq_group *group;
 
-	g_return_val_if_fail(gc != NULL && gc->proto_data != NULL, NULL);
 	g_return_val_if_fail(data != NULL, NULL);
 	qd = (qq_data *) gc->proto_data;
 
@@ -181,7 +178,7 @@
 {
 	GaimChat *chat;
 	gchar *external_group_id;
-	g_return_if_fail(gc != NULL && group != NULL);
+	g_return_if_fail(group != NULL);
 
 	external_group_id = g_strdup_printf("%d", group->external_group_id);
 	chat = gaim_blist_find_chat(gaim_connection_get_account(gc), external_group_id);
--- a/libgaim/protocols/qq/group_join.c	Tue Sep 26 21:37:37 2006 +0000
+++ b/libgaim/protocols/qq/group_join.c	Tue Sep 26 22:54:24 2006 +0000
@@ -48,7 +48,6 @@
 	guint32 internal_group_id;
 	qq_group *group;
 
-	g_return_if_fail(g != NULL && g->gc != NULL && g->uid > 0);
 	gc = g->gc;
 	internal_group_id = g->uid;
 
@@ -64,7 +63,7 @@
 	guint8 *raw_data, *cursor;
 	gint bytes, data_len;
 
-	g_return_if_fail(gc != NULL && group != NULL);
+	g_return_if_fail(group != NULL);
 
 	if (group->my_status == QQ_GROUP_MEMBER_STATUS_NOT_MEMBER) {
 		group->my_status = QQ_GROUP_MEMBER_STATUS_APPLYING;
@@ -104,7 +103,6 @@
 	qq_group *group;
 	guint32 internal_group_id;
 
-	g_return_if_fail(g != NULL && g->gc != NULL && g->uid > 0);
 	gc = g->gc;
 	internal_group_id = g->uid;
 
@@ -121,7 +119,7 @@
 {
 	gchar *msg;
 	gc_and_uid *g;
-	g_return_if_fail(gc != NULL && group != NULL);
+	g_return_if_fail(group != NULL);
 
 	gaim_debug(GAIM_DEBUG_INFO, "QQ", 
 			"Group (internal id: %d) needs authentication\n", group->internal_group_id);
@@ -145,7 +143,7 @@
 	gchar *reason_qq;
 	gint bytes, data_len;
 
-	g_return_if_fail(gc != NULL && group != NULL);
+	g_return_if_fail(group != NULL);
 
 	if (reason_utf8 == NULL || strlen(reason_utf8) == 0)
 		reason_qq = g_strdup("");
@@ -183,7 +181,7 @@
 	guint8 *raw_data, *cursor;
 	gint bytes, data_len;
 
-	g_return_if_fail(gc != NULL && group != NULL);
+	g_return_if_fail(group != NULL);
 
 	data_len = 5;
 	raw_data = g_newa(guint8, data_len);
@@ -209,7 +207,6 @@
 	qq_group *group;
 	qq_data *qd;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
 	g_return_if_fail(data != NULL && len > 0);
 	qd = (qq_data *) gc->proto_data;
 
@@ -241,7 +238,6 @@
 	guint32 internal_group_id;
 	qq_data *qd;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
 	g_return_if_fail(data != NULL && len > 0);
 	qd = (qq_data *) gc->proto_data;
 
@@ -267,7 +263,7 @@
 	guint8 reply;
 	qq_group *group;
 
-	g_return_if_fail(gc != NULL && data != NULL && len > 0);
+	g_return_if_fail(data != NULL && len > 0);
 
 	bytes = 0;
 	expected_bytes = 5;
@@ -315,7 +311,7 @@
 	guint32 external_group_id;
 	qq_group *group;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL && data != NULL);
+	g_return_if_fail(data != NULL);
 	qd = (qq_data *) gc->proto_data;
 
 	external_group_id_ptr = g_hash_table_lookup(data, QQ_GROUP_KEY_EXTERNAL_ID);
@@ -343,7 +339,7 @@
 	guint32 internal_group_id;
 	gc_and_uid *g;
 
-	g_return_if_fail(gc != NULL && data != NULL);
+	g_return_if_fail(data != NULL);
 
 	internal_group_id_ptr = g_hash_table_lookup(data, "internal_group_id");
 	internal_group_id = strtol(internal_group_id_ptr, NULL, 10);
--- a/libgaim/protocols/qq/group_network.c	Tue Sep 26 21:37:37 2006 +0000
+++ b/libgaim/protocols/qq/group_network.c	Tue Sep 26 22:54:24 2006 +0000
@@ -80,7 +80,7 @@
 static void _qq_process_group_cmd_reply_error_default(guint8 reply, guint8 *cursor, gint len, GaimConnection *gc)
 {
 	gchar *msg, *msg_utf8;
-	g_return_if_fail(cursor != NULL && len > 0 && gc != NULL);
+	g_return_if_fail(cursor != NULL && len > 0);
 
 	msg = g_strndup((gchar *) cursor, len);	/* it will append 0x00 */
 	msg_utf8 = qq_to_utf8(msg, QQ_CHARSET_DEFAULT);
@@ -94,7 +94,7 @@
 /* default process, dump only */
 static void _qq_process_group_cmd_reply_default(guint8 *data, guint8 **cursor, gint len, GaimConnection *gc)
 {
-	g_return_if_fail(gc != NULL && data != NULL && len > 0);
+	g_return_if_fail(data != NULL && len > 0);
 	gaim_debug(GAIM_DEBUG_INFO, "QQ", "Dump unprocessed group cmd reply:\n%s", hex_dump_to_str(data, len));
 }
 
@@ -104,11 +104,9 @@
 	qq_data *qd;
 	group_packet *p;
 
-	g_return_if_fail(gc != NULL);
 	g_return_if_fail(raw_data != NULL && data_len > 0);
 
 	qd = (qq_data *) gc->proto_data;
-	g_return_if_fail(qd != NULL);
 
 	qq_send_cmd(gc, QQ_CMD_GROUP_CMD, TRUE, 0, TRUE, raw_data, data_len);
 
@@ -132,7 +130,6 @@
 	guint32 internal_group_id;
 	guint8 *data, *cursor, sub_cmd, reply;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
 	g_return_if_fail(buf != NULL && buf_len != 0);
 
 	qd = (qq_data *) gc->proto_data;
--- a/libgaim/protocols/qq/group_opt.c	Tue Sep 26 21:37:37 2006 +0000
+++ b/libgaim/protocols/qq/group_opt.c	Tue Sep 26 22:54:24 2006 +0000
@@ -81,7 +81,7 @@
 {
 	guint8 *data, *cursor;
 	gint i, count, data_len;
-	g_return_if_fail(gc != NULL && group != NULL && members != NULL);
+	g_return_if_fail(members != NULL);
 
 	for (i = 0; members[i] != 0xffffffff; i++) {;
 	}
@@ -162,7 +162,7 @@
 	gint i = 0, old = 0, new = 0, del = 0, add = 0;
 	GList *list;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL && group != NULL);
+	g_return_if_fail(group != NULL);
 	qd = (qq_data *) gc->proto_data;
 	if (new_members[0] == 0xffffffff)
 		return;
@@ -214,7 +214,7 @@
 {
 	guint32 internal_group_id;
 	qq_group *group;
-	g_return_if_fail(data != NULL && gc != NULL);
+	g_return_if_fail(data != NULL);
 
 	read_packet_dw(data, cursor, len, &internal_group_id);
 	g_return_if_fail(internal_group_id > 0);
@@ -234,7 +234,7 @@
 	guint8 *data, *cursor;
 	gchar *group_name, *group_desc, *notice;
 
-	g_return_if_fail(gc != NULL && group != NULL);
+	g_return_if_fail(group != NULL);
 
 	group_name = group->group_name_utf8 == NULL ? "" : utf8_to_qq(group->group_name_utf8, QQ_CHARSET_DEFAULT);
 	group_desc = group->group_desc_utf8 == NULL ? "" : utf8_to_qq(group->group_desc_utf8, QQ_CHARSET_DEFAULT);
@@ -283,7 +283,7 @@
 {
 	guint32 internal_group_id;
 	qq_group *group;
-	g_return_if_fail(data != NULL && gc != NULL);
+	g_return_if_fail(data != NULL);
 
 	read_packet_dw(data, cursor, len, &internal_group_id);
 	g_return_if_fail(internal_group_id > 0);
@@ -304,7 +304,7 @@
 	gint data_len, data_written;
 	guint8 *data, *cursor;
 	qq_data *qd;
-	g_return_if_fail(gc != NULL && name != NULL);
+	g_return_if_fail(name != NULL);
 
 	qd = (qq_data *) gc->proto_data;
 	data_len = 7 + 1 + strlen(name) + 2 + 1 + 1 + 4;
@@ -359,7 +359,7 @@
 	gc_and_uid *g;
 	qq_data *qd;
 
-	g_return_if_fail(data != NULL && gc != NULL);
+	g_return_if_fail(data != NULL);
 	g_return_if_fail(gc->proto_data != NULL);
 	qd = (qq_data *) gc->proto_data;
 
@@ -395,7 +395,7 @@
 {
 	gint data_len, data_written;
 	guint8 *data, *cursor;
-	g_return_if_fail(gc != NULL && internal_group_id > 0);
+	g_return_if_fail(internal_group_id > 0);
 
 	data_len = 5;
 	data = g_newa(guint8, data_len);
@@ -420,7 +420,7 @@
 {
 	guint32 internal_group_id;
 	qq_group *group;
-	g_return_if_fail(data != NULL && gc != NULL);
+	g_return_if_fail(data != NULL);
 
 	read_packet_dw(data, cursor, len, &internal_group_id);
 	g_return_if_fail(internal_group_id > 0);
@@ -438,7 +438,7 @@
 	guint32 internal_group_id;
 	qq_group *group;
 
-	g_return_if_fail(gc != NULL && data != NULL);
+	g_return_if_fail(data != NULL);
 
 	internal_group_id_ptr = g_hash_table_lookup(data, "internal_group_id");
 	internal_group_id = strtol(internal_group_id_ptr, NULL, 10);
--- a/libgaim/protocols/qq/group_search.c	Tue Sep 26 21:37:37 2006 +0000
+++ b/libgaim/protocols/qq/group_search.c	Tue Sep 26 22:54:24 2006 +0000
@@ -42,8 +42,6 @@
 	guint8 *raw_data, *cursor, type;
 	gint bytes, data_len;
 
-	g_return_if_fail(gc != NULL);
-
 	data_len = 6;
 	raw_data = g_newa(guint8, data_len);
 	cursor = raw_data;
@@ -96,7 +94,6 @@
 	qq_group *group;
 	GSList *pending_id;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
 	g_return_if_fail(data != NULL && len > 0);
 	qd = (qq_data *) gc->proto_data;
 
--- a/libgaim/protocols/qq/im.c	Tue Sep 26 21:37:37 2006 +0000
+++ b/libgaim/protocols/qq/im.c	Tue Sep 26 22:54:24 2006 +0000
@@ -252,7 +252,7 @@
 	qq_data *qd;
 	qq_recv_normal_im_text *im_text;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL && common != NULL);
+	g_return_if_fail(common != NULL);
 	qd = (qq_data *) gc->proto_data;
 
 	/* now it is QQ_NORMAL_IM_TEXT */
@@ -402,7 +402,7 @@
 	guint8 reply;
 	gchar **segments, *msg_utf8;
 
-	g_return_if_fail(gc != NULL && data != NULL && data_len != 0);
+	g_return_if_fail(data != NULL && data_len != 0);
 
 	if (*cursor >= (data + data_len - 1)) {
 		gaim_debug(GAIM_DEBUG_WARNING, "QQ", "Received sys IM is empty\n");
@@ -435,8 +435,6 @@
 	gboolean is_bold = FALSE, is_italic = FALSE, is_underline = FALSE;
 	const gchar *start, *end, *last;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
-
 	qd = (qq_data *) gc->proto_data;
 	client_tag = QQ_CLIENT;
 	normal_im_type = QQ_NORMAL_IM_TEXT;
@@ -554,7 +552,6 @@
 	gint len;
 	guint8 *data, *cursor, reply;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
 	g_return_if_fail(buf != NULL && buf_len != 0);
 
 	qd = gc->proto_data;
@@ -584,7 +581,6 @@
 	guint8 *data, *cursor;
 	qq_recv_im_header *im_header;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
 	g_return_if_fail(buf != NULL && buf_len != 0);
 
 	qd = (qq_data *) gc->proto_data;
--- a/libgaim/protocols/qq/keep_alive.c	Tue Sep 26 21:37:37 2006 +0000
+++ b/libgaim/protocols/qq/keep_alive.c	Tue Sep 26 22:54:24 2006 +0000
@@ -46,8 +46,6 @@
 	qq_data *qd;
 	guint8 *raw_data, *cursor;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
-
 	qd = (qq_data *) gc->proto_data;
 	raw_data = g_newa(guint8, 4);
 	cursor = raw_data;
@@ -67,7 +65,6 @@
 	gchar **segments;
 	guint8 *data;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
 	g_return_if_fail(buf != NULL && buf_len != 0);
 
 	qd = (qq_data *) gc->proto_data;
@@ -104,12 +101,9 @@
 	qq_data *qd;
 	qq_buddy *q_bud;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
-
 	qd = (qq_data *) (gc->proto_data);
 	now = time(NULL);
 	list = qd->buddies;
-	g_return_if_fail(qd != NULL);
 
 	while (list != NULL) {
 		q_bud = (qq_buddy *) list->data;
@@ -128,7 +122,7 @@
 	GaimBuddy *bud;
 	gchar *status_id;
 	
-	g_return_if_fail(gc != NULL && q_bud != NULL);
+	g_return_if_fail(q_bud != NULL);
 
 	name = uid_to_gaim_name(q_bud->uid);
 	bud = gaim_find_buddy(gc->account, name);
--- a/libgaim/protocols/qq/login_logout.c	Tue Sep 26 21:37:37 2006 +0000
+++ b/libgaim/protocols/qq/login_logout.c	Tue Sep 26 22:54:24 2006 +0000
@@ -157,8 +157,6 @@
 	qq_data *qd;
 	qq_login_reply_ok_packet lrop;
 
-	g_return_val_if_fail(gc != NULL && gc->proto_data != NULL, QQ_LOGIN_REPLY_MISC_ERROR);
-
 	qd = (qq_data *) gc->proto_data;
 	cursor = data;
 	bytes = 0;
@@ -251,8 +249,6 @@
 	qq_data *qd;
 	qq_login_reply_redirect_packet lrrp;
 
-	g_return_val_if_fail(gc != NULL && gc->proto_data != NULL, QQ_LOGIN_REPLY_MISC_ERROR);
-
 	qd = (qq_data *) gc->proto_data;
 	cursor = data;
 	bytes = 0;
@@ -304,8 +300,6 @@
 	guint16 seq_ret;
 	gint bytes;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
-
 	qd = (qq_data *) gc->proto_data;
 	buf = g_newa(guint8, MAX_PACKET_SIZE);
 
@@ -335,8 +329,6 @@
 	gint encrypted_len, bytes;
 	gint pos;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
-
 	qd = (qq_data *) gc->proto_data;
 	buf = g_newa(guint8, MAX_PACKET_SIZE);
 	raw_data = g_newa(guint8, QQ_LOGIN_DATA_LENGTH);
@@ -391,7 +383,6 @@
 {
         qq_data *qd;
 
-        g_return_if_fail(gc != NULL && gc->proto_data != NULL);
         g_return_if_fail(buf != NULL && buf_len != 0);
 
         qd = (qq_data *) gc->proto_data;
@@ -422,8 +413,6 @@
 	gint i;
 	qq_data *qd;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
-
 	qd = (qq_data *) gc->proto_data;
 	for (i = 0; i < 4; i++)
 		qq_send_cmd(gc, QQ_CMD_LOGOUT, FALSE, 0xffff, FALSE, qd->pwkey, QQ_KEY_LENGTH);
@@ -438,7 +427,6 @@
 	guint8 *data;
 	qq_data *qd;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
 	g_return_if_fail(buf != NULL && buf_len != 0);
 
 	qd = (qq_data *) gc->proto_data;
--- a/libgaim/protocols/qq/qq.c	Tue Sep 26 21:37:37 2006 +0000
+++ b/libgaim/protocols/qq/qq.c	Tue Sep 26 22:54:24 2006 +0000
@@ -314,7 +314,7 @@
 	gchar *msg, *msg_with_qq_smiley;
 	qq_data *qd;
 
-	g_return_val_if_fail(gc != NULL && gc->proto_data != NULL && who != NULL, -1);
+	g_return_val_if_fail(who != NULL, -1);
 
 	qd = (qq_data *) gc->proto_data;
 
@@ -343,7 +343,7 @@
 	gchar *msg, *msg_with_qq_smiley;
 	qq_group *group;
 
-	g_return_val_if_fail(gc != NULL && message != NULL, -1);
+	g_return_val_if_fail(message != NULL, -1);
 	g_return_val_if_fail(strlen(message) <= QQ_MSG_IM_MAX, -E2BIG);
 
 	group = qq_group_find_by_channel(gc, channel);
@@ -364,7 +364,6 @@
 	guint32 uid;
 	qq_data *qd;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
 	qd = gc->proto_data;
 	uid = gaim_name_to_uid(who);
 
@@ -383,8 +382,6 @@
 	GaimConnection *gc = (GaimConnection *) action->context;
 	qq_data *qd;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
-
 	qd = (qq_data *) gc->proto_data;
 	qq_prepare_modify_info(gc);
 }
@@ -395,7 +392,6 @@
 	GaimRequestField *field;
 	gint suffix;
 	
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
 	qd = (qq_data *) gc->proto_data;
 
 	field = gaim_request_fields_get_field(fields, "face_num");
@@ -485,7 +481,7 @@
 	buddy = (GaimBuddy *) node;
 	gc = gaim_account_get_connection(buddy->account);
 	who = buddy->name;
-	g_return_if_fail(gc != NULL && who != NULL);
+	g_return_if_fail(who != NULL);
 
 	uid = gaim_name_to_uid(who);
 	g_return_if_fail(uid > 0);
@@ -510,8 +506,6 @@
 	qq_data *qd;
 	GString *info;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
-
 	qd = (qq_data *) gc->proto_data;
 	info = g_string_new("<html><body>\n");
 
@@ -549,7 +543,6 @@
 static void _qq_menu_create_permanent_group(GaimPluginAction * action)
 {
 	GaimConnection *gc = (GaimConnection *) action->context;
-	g_return_if_fail(gc != NULL);
 	gaim_request_input(gc, _("Create QQ Qun"),
 			   _("Input Qun name here"),
 			   _("Only QQ member can create permanent Qun"),
@@ -566,7 +559,7 @@
 
 	g_return_if_fail(GAIM_BLIST_NODE_IS_CHAT(node));
 
-	g_return_if_fail(gc != NULL && components != NULL);
+	g_return_if_fail(components != NULL);
 	qq_group_exit(gc, components);
 }
 
@@ -579,7 +572,7 @@
 
 	g_return_if_fail(GAIM_BLIST_NODE_IS_CHAT(node));
 
-	g_return_if_fail(gc != NULL && components != NULL);
+	g_return_if_fail(components != NULL);
 	qq_group_manage_group(gc, components);
 }
 */
@@ -765,7 +758,6 @@
 
 	gc = (GaimConnection *) action->context;
 	qd = (qq_data *) gc->proto_data;
-	g_return_if_fail(gc != NULL && qd != NULL);
 
 	fields = gaim_request_fields_new();
 	group = gaim_request_field_group_new(_("Basic Elements"));
@@ -886,7 +878,6 @@
 	qq_data *qd;
 	GList *list;
 
-	g_return_if_fail(gc != NULL);
 	if (NULL == (qd = (qq_data *) gc->proto_data))
 		return;
 
@@ -910,7 +901,7 @@
 static void _qq_get_chat_buddy_info(GaimConnection *gc, gint channel, const gchar *who)
 {
 	gchar *gaim_name;
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL && who != NULL);
+	g_return_if_fail(who != NULL);
 
 	gaim_name = chat_name_to_gaim_name(who);
 	if (gaim_name != NULL)
@@ -921,7 +912,7 @@
 /* who is the nickname of buddy in QQ chat-room (Qun) */
 static gchar *_qq_get_chat_buddy_real_name(GaimConnection *gc, gint channel, const gchar *who)
 {
-	g_return_val_if_fail(gc != NULL && gc->proto_data != NULL && who != NULL, NULL);
+	g_return_val_if_fail(who != NULL, NULL);
 	return chat_name_to_gaim_name(who);
 }
 
--- a/libgaim/protocols/qq/recv_core.c	Tue Sep 26 21:37:37 2006 +0000
+++ b/libgaim/protocols/qq/recv_core.c	Tue Sep 26 22:54:24 2006 +0000
@@ -63,7 +63,6 @@
 	qq_data *qd;
 	guint8 *byte, mask;
 
-	g_return_val_if_fail(gc != NULL && gc->proto_data != NULL, FALSE);
 	qd = (qq_data *) gc->proto_data;
 	byte = &(qd->window[seq / 8]);
 	mask = (1 << (seq % 8));
@@ -72,7 +71,7 @@
 		return TRUE;	/* check mask */
 	(*byte) |= mask;
 	return FALSE;		/* set mask */
-}				/* _qq_check_packet_set_window */
+}
 
 /* default process, decrypt and dump */
 static void _qq_process_packet_default(guint8 *buf, gint buf_len, guint16 cmd, guint16 seq, GaimConnection *gc)
@@ -82,7 +81,6 @@
 	gchar *msg_utf8;
 	gint len;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
 	g_return_if_fail(buf != NULL && buf_len != 0);
 
 	qd = (qq_data *) gc->proto_data;
@@ -111,7 +109,6 @@
 	qq_recv_msg_header header;
 	packet_before_login *b4_packet;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
 	g_return_if_fail(buf != NULL && buf_len > 0);
 
 	qd = (qq_data *) gc->proto_data;
@@ -297,8 +294,6 @@
 
 	gc = (GaimConnection *) data;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
-
 	if(cond != GAIM_INPUT_READ) {
 		gaim_connection_error(gc, _("Socket error"));
 		return;
--- a/libgaim/protocols/qq/send_core.c	Tue Sep 26 21:37:37 2006 +0000
+++ b/libgaim/protocols/qq/send_core.c	Tue Sep 26 22:54:24 2006 +0000
@@ -40,8 +40,7 @@
 	qq_data *qd;
 	gint bytes_expected, bytes_written;
 
-	g_return_val_if_fail(gc != NULL &&
-			     gc->proto_data != NULL && buf != NULL && cursor != NULL && *cursor != NULL, -1);
+	g_return_val_if_fail(buf != NULL && cursor != NULL && *cursor != NULL, -1);
 
 	qd = (qq_data *) gc->proto_data;
 	if (is_auto_seq)
@@ -80,8 +79,6 @@
 	gint bytes_sent;
 	guint8 *cursor;
 
-	g_return_val_if_fail(gc != NULL && gc->proto_data != NULL, -1);
-
 	qd = (qq_data *) gc->proto_data;
 
 	if (qd->use_tcp) {
@@ -124,8 +121,6 @@
 	guint16 seq_ret;
 	gint encrypted_len, bytes_written, bytes_expected, bytes_sent;
 
-	g_return_val_if_fail(gc != NULL && gc->proto_data != NULL, -1);
-
 	qd = (qq_data *) gc->proto_data;
 	g_return_val_if_fail(qd->session_key != NULL, -1);
 
--- a/libgaim/protocols/qq/send_file.c	Tue Sep 26 21:37:37 2006 +0000
+++ b/libgaim/protocols/qq/send_file.c	Tue Sep 26 22:54:24 2006 +0000
@@ -496,7 +496,6 @@
 	gint packet_len, bytes;
 	ft_info *info;
 
-	g_return_if_fail (gc != NULL && gc->proto_data != NULL);
 	qd = (qq_data *) gc->proto_data;
 	info = (ft_info *) qd->xfer->data;
 
@@ -567,7 +566,6 @@
 	gint packet_len, bytes;
 
 	gaim_debug(GAIM_DEBUG_INFO, "_qq_send_packet_file_reject", "start");
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
 	qd = (qq_data *) gc->proto_data;
 
 	packet_len = 64;
@@ -594,7 +592,6 @@
 	gint packet_len, bytes;
 
 	gaim_debug(GAIM_DEBUG_INFO, "_qq_send_packet_file_cancel", "start\n");
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
 	qd = (qq_data *) gc->proto_data;
 
 	packet_len = 64;
@@ -631,7 +628,6 @@
 	g_return_if_fail (xfer != NULL);
 	account = gaim_xfer_get_account(xfer);
 	gc = gaim_account_get_connection(account);
-	g_return_if_fail (gc != NULL && gc->proto_data != NULL);
 
 	to_uid = gaim_name_to_uid (xfer->who);
 	g_return_if_fail (to_uid != 0);
@@ -700,9 +696,9 @@
 	gchar *msg, *filename;
 	qq_data *qd;
 
-	g_return_if_fail (gc != NULL && data != NULL && data_len != 0);
+	g_return_if_fail (data != NULL && data_len != 0);
 	qd = (qq_data *) gc->proto_data;
-	g_return_if_fail (qd != NULL && qd->xfer != NULL);
+	g_return_if_fail (qd->xfer != NULL);
 
 	if (*cursor >= (data + data_len - 1)) {
 		gaim_debug (GAIM_DEBUG_WARNING, "QQ",
@@ -724,14 +720,14 @@
 
 /* process cancel im for file transfer request */
 void qq_process_recv_file_cancel (guint8 *data, guint8 **cursor, gint data_len, 
-		guint32 sender_uid, GaimConnection * gc)
+		guint32 sender_uid, GaimConnection *gc)
 {
 	gchar *msg, *filename;
 	qq_data *qd;
 
-	g_return_if_fail (gc != NULL && data != NULL && data_len != 0);
+	g_return_if_fail (data != NULL && data_len != 0);
 	qd = (qq_data *) gc->proto_data;
-	g_return_if_fail (qd != NULL && qd->xfer != NULL
+	g_return_if_fail (qd->xfer != NULL
 			&& gaim_xfer_get_filename(qd->xfer) != NULL);
 
 	if (*cursor >= (data + data_len - 1)) {
@@ -753,13 +749,13 @@
 
 /* process accept im for file transfer request */
 void qq_process_recv_file_accept(guint8 *data, guint8 **cursor, gint data_len, 
-		guint32 sender_uid, GaimConnection * gc)
+		guint32 sender_uid, GaimConnection *gc)
 {
 	qq_data *qd;
 	ft_info *info;
 	GaimXfer *xfer;
 
-	g_return_if_fail (gc != NULL && data != NULL && data_len != 0);
+	g_return_if_fail (data != NULL && data_len != 0);
 	qd = (qq_data *) gc->proto_data;
 	xfer = qd->xfer;
 
@@ -790,7 +786,7 @@
 	GaimBuddy *b;
 	qq_buddy *q_bud;
 
-	g_return_if_fail (gc != NULL && data != NULL && data_len != 0);
+	g_return_if_fail (data != NULL && data_len != 0);
 	qd = (qq_data *) gc->proto_data;
 
 	if (*cursor >= (data + data_len - 1)) {
@@ -892,7 +888,7 @@
 	ft_info *info;
 	GaimXfer *xfer;
 
-	g_return_if_fail (gc != NULL && data != NULL && data_len != 0);
+	g_return_if_fail (data != NULL && data_len != 0);
 	qd = (qq_data *) gc->proto_data;
 
 	if (*cursor >= (data + data_len - 1)) {
@@ -925,7 +921,6 @@
 	qq_data *qd;
 	GaimXfer *xfer;
 
-	g_return_if_fail (gc != NULL && gc->proto_data != NULL);
 	qd = (qq_data *) gc->proto_data;
 
 	xfer = gaim_xfer_new (gc->account, GAIM_XFER_SEND,
--- a/libgaim/protocols/qq/sendqueue.c	Tue Sep 26 21:37:37 2006 +0000
+++ b/libgaim/protocols/qq/sendqueue.c	Tue Sep 26 22:54:24 2006 +0000
@@ -46,8 +46,6 @@
 	GList *list;
 	qq_sendpacket *p;
 
-	g_return_if_fail(qd != NULL);
-
 	list = qd->sendqueue;
 	while (list != NULL) {
 		p = (qq_sendpacket *) (list->data);
--- a/libgaim/protocols/qq/sys_msg.c	Tue Sep 26 21:37:37 2006 +0000
+++ b/libgaim/protocols/qq/sys_msg.c	Tue Sep 26 22:54:24 2006 +0000
@@ -52,7 +52,6 @@
 	GaimAccount *account;
 
 	account = gaim_connection_get_account(gc);
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
 
 	log = gaim_log_new(GAIM_LOG_IM,
 			"systemim",
@@ -141,7 +140,7 @@
 	gc_and_uid *g;
 	gchar *name;
 
-	g_return_if_fail(gc != NULL && from != NULL && to != NULL);
+	g_return_if_fail(from != NULL && to != NULL);
 
 	uid = strtol(from, NULL, 10);
 	name = uid_to_gaim_name(uid);
@@ -173,7 +172,7 @@
 {
 	gchar *message, *reason;
 
-	g_return_if_fail(gc != NULL && from != NULL && to != NULL);
+	g_return_if_fail(from != NULL && to != NULL);
 
 	message = g_strdup_printf(_("User %s rejected your request"), from);
 	reason = g_strdup_printf(_("Reason: %s"), msg_utf8);
@@ -190,7 +189,7 @@
 	gchar *message;
 	qq_data *qd;
 
-	g_return_if_fail(gc != NULL && from != NULL && to != NULL);
+	g_return_if_fail(from != NULL && to != NULL);
 
 	qd = (qq_data *) gc->proto_data;
 	qq_add_buddy_by_recv_packet(gc, strtol(from, NULL, 10), TRUE, TRUE);
@@ -211,7 +210,7 @@
 	GaimBuddy *b;
 	gchar *name;
 
-	g_return_if_fail(gc != NULL && from != NULL && to != NULL);
+	g_return_if_fail(from != NULL && to != NULL);
 
 	uid = strtol(from, NULL, 10);
 	g = g_new0(gc_and_uid, 1);
@@ -258,7 +257,6 @@
 	guint8 *data;
 	gchar **segments, *code, *from, *to, *msg, *msg_utf8;
 
-	g_return_if_fail(gc != NULL && gc->proto_data != NULL);
 	g_return_if_fail(buf != NULL && buf_len != 0);
 
 	qd = (qq_data *) gc->proto_data;