[empathy] empathy-contact-manager: remove unrequired for loop when unpacking struct



commit 3ef2b98db024258db0161755b35bfc2a0a577bad
Author: Danielle Madeley <danielle madeley collabora co uk>
Date:   Wed Mar 24 16:58:24 2010 +1100

    empathy-contact-manager: remove unrequired for loop when unpacking struct

 libempathy/empathy-contact-manager.c |   19 +++++--------------
 1 files changed, 5 insertions(+), 14 deletions(-)
---
diff --git a/libempathy/empathy-contact-manager.c b/libempathy/empathy-contact-manager.c
index fd7b08b..9042a2c 100644
--- a/libempathy/empathy-contact-manager.c
+++ b/libempathy/empathy-contact-manager.c
@@ -320,22 +320,13 @@ static void
 logger_favourite_contacts_add_from_value_array (GValueArray           *va,
 						EmpathyContactManager *manager)
 {
-	guint i;
+	const gchar *account;
+	const gchar **contacts;
 
-	for (i = 0; i < va->n_values; i++) {
-		GValue *account_value;
-		const gchar *account;
-		GValue *contacts_value;
-		const gchar **contacts;
+	account = g_value_get_boxed (g_value_array_get_nth (va, 0));
+	contacts = g_value_get_boxed (g_value_array_get_nth (va, 1));
 
-		account_value = g_value_array_get_nth (va, 0);
-		contacts_value = g_value_array_get_nth (va, 1);
-
-		account = g_value_get_boxed (account_value);
-		contacts = g_value_get_boxed (contacts_value);
-
-		add_contacts_to_favourites (manager, account, contacts);
-	}
+	add_contacts_to_favourites (manager, account, contacts);
 }
 
 static void



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