[empathy] don't mix code and variable declarations



commit fa08a8879c77e99f706ee805df0e2821f202e9de
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Wed Nov 18 13:53:25 2009 +0000

    don't mix code and variable declarations

 libempathy-gtk/empathy-chat.c |    8 ++++----
 libempathy/empathy-tp-chat.c  |    6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index cc946b1..372e90c 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -1791,12 +1791,12 @@ chat_members_changed_cb (EmpathyTpChat  *tp_chat,
 			 gboolean        is_member,
 			 EmpathyChat    *chat)
 {
-	g_return_if_fail (TP_CHANNEL_GROUP_CHANGE_REASON_RENAMED != reason);
-
 	EmpathyChatPriv *priv = GET_PRIV (chat);
 	const gchar *name = empathy_contact_get_name (contact);
 	gchar *str;
 
+	g_return_if_fail (TP_CHANNEL_GROUP_CHANGE_REASON_RENAMED != reason);
+
 	if (priv->block_events_timeout_id != 0)
 		return;
 
@@ -1819,10 +1819,10 @@ chat_member_renamed_cb (EmpathyTpChat  *tp_chat,
 			 gchar          *message,
 			 EmpathyChat    *chat)
 {
-	g_return_if_fail (TP_CHANNEL_GROUP_CHANGE_REASON_RENAMED == reason);
-
 	EmpathyChatPriv *priv = GET_PRIV (chat);
 
+	g_return_if_fail (TP_CHANNEL_GROUP_CHANGE_REASON_RENAMED == reason);
+
 	if (priv->block_events_timeout_id == 0) {
 		gchar *str;
 
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c
index aebeb66..c1a70b6 100644
--- a/libempathy/empathy-tp-chat.c
+++ b/libempathy/empathy-tp-chat.c
@@ -986,6 +986,7 @@ tp_chat_got_renamed_contacts_cb (EmpathyTpContactFactory *factory,
 	const TpIntSet *members;
 	TpHandle handle;
 	EmpathyContact *old = NULL, *new = NULL;
+	ContactRenameData *rename_data = (ContactRenameData*) user_data;
 
 	if (error) {
 		DEBUG ("Error: %s", error->message);
@@ -995,8 +996,6 @@ tp_chat_got_renamed_contacts_cb (EmpathyTpContactFactory *factory,
 	/* renamed members can only be delivered one at a time */
 	g_warn_if_fail (n_contacts == 1);
 
-	ContactRenameData *rename_data = (ContactRenameData*) user_data;
-
 	new = contacts[0];
 
 	members = tp_channel_group_get_members (priv->channel);
@@ -1039,6 +1038,7 @@ tp_chat_group_members_changed_cb (TpChannel     *self,
 	EmpathyContact *actor_contact = NULL;
 	guint i;
 	ContactRenameData *rename_data;
+	TpHandle old_handle;
 
 	/* Contact renamed */
 	if (reason == TP_CHANNEL_GROUP_CHANGE_REASON_RENAMED) {
@@ -1046,7 +1046,7 @@ tp_chat_group_members_changed_cb (TpChannel     *self,
 		g_warn_if_fail(removed->len == 1);
 		g_warn_if_fail(added->len == 1);
 
-		TpHandle old_handle = g_array_index (removed, guint, 0);
+		old_handle = g_array_index (removed, guint, 0);
 
 		rename_data = contact_rename_data_new (old_handle, reason, message);
 		empathy_tp_contact_factory_get_from_handles (priv->factory,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]