diff options
author | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2010-03-24 13:58:24 +0800 |
---|---|---|
committer | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2010-03-24 16:34:05 +0800 |
commit | 3ef2b98db024258db0161755b35bfc2a0a577bad (patch) | |
tree | f16f17a270611d5ecb1dd68802d260342a1347a5 | |
parent | ae5f68d68c85b00d8b9dc337bb77fea393341f1c (diff) | |
download | gsoc2013-empathy-3ef2b98db024258db0161755b35bfc2a0a577bad.tar gsoc2013-empathy-3ef2b98db024258db0161755b35bfc2a0a577bad.tar.gz gsoc2013-empathy-3ef2b98db024258db0161755b35bfc2a0a577bad.tar.bz2 gsoc2013-empathy-3ef2b98db024258db0161755b35bfc2a0a577bad.tar.lz gsoc2013-empathy-3ef2b98db024258db0161755b35bfc2a0a577bad.tar.xz gsoc2013-empathy-3ef2b98db024258db0161755b35bfc2a0a577bad.tar.zst gsoc2013-empathy-3ef2b98db024258db0161755b35bfc2a0a577bad.zip |
empathy-contact-manager: remove unrequired for loop when unpacking struct
-rw-r--r-- | 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 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 |