]> git.0d.be Git - empathy.git/commitdiff
empathy-contact-manager: remove unrequired for loop when unpacking struct
authorDanielle Madeley <danielle.madeley@collabora.co.uk>
Wed, 24 Mar 2010 05:58:24 +0000 (16:58 +1100)
committerDanielle Madeley <danielle.madeley@collabora.co.uk>
Wed, 24 Mar 2010 08:34:05 +0000 (19:34 +1100)
libempathy/empathy-contact-manager.c

index fd7b08b14a742f3b32c455a4ee193df387ca32ba..9042a2c21e0b6c7c4fd6ddae6e01155ec3d9c2de 100644 (file)
@@ -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