From 3ef2b98db024258db0161755b35bfc2a0a577bad Mon Sep 17 00:00:00 2001 From: Danielle Madeley Date: Wed, 24 Mar 2010 16:58:24 +1100 Subject: empathy-contact-manager: remove unrequired for loop when unpacking struct --- libempathy/empathy-contact-manager.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/libempathy/empathy-contact-manager.c b/libempathy/empathy-contact-manager.c index fd7b08b14..9042a2c21 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 -- cgit v1.2.3