diff libgaim/protocols/qq/qq.c @ 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 8ed6ef220b2d
children a33d179d5508
line wrap: on
line diff
--- 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);
 }