aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-09-20 21:01:27 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-09-21 14:46:29 +0800
commit25c6dfd249873bb165a9050950937fa0ea545101 (patch)
tree745e75ea330033b4a8d5314bac04634a72b35dc2
parentddcf0a2ff6368fbfba7b163a1c00929d3fca65eb (diff)
downloadgsoc2013-empathy-25c6dfd249873bb165a9050950937fa0ea545101.tar
gsoc2013-empathy-25c6dfd249873bb165a9050950937fa0ea545101.tar.gz
gsoc2013-empathy-25c6dfd249873bb165a9050950937fa0ea545101.tar.bz2
gsoc2013-empathy-25c6dfd249873bb165a9050950937fa0ea545101.tar.lz
gsoc2013-empathy-25c6dfd249873bb165a9050950937fa0ea545101.tar.xz
gsoc2013-empathy-25c6dfd249873bb165a9050950937fa0ea545101.tar.zst
gsoc2013-empathy-25c6dfd249873bb165a9050950937fa0ea545101.zip
migrate_account_to_uoa: actually iterate over the supersedes array
I'm not a fan of pointer arithmetic, it's clearer to iterate using an index. https://bugzilla.gnome.org/show_bug.cgi?id=684475
-rw-r--r--src/empathy-sanity-cleaning.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/empathy-sanity-cleaning.c b/src/empathy-sanity-cleaning.c
index 60cecc972..e3688c6c4 100644
--- a/src/empathy-sanity-cleaning.c
+++ b/src/empathy-sanity-cleaning.c
@@ -399,6 +399,7 @@ migrate_account_to_uoa (TpAccountManager *am,
GVariant *param;
GVariantIter iter;
const gchar * const *supersedes;
+ guint i;
UoaMigrationData *data;
DEBUG ("Migrating account %s to UOA storage\n",
@@ -420,8 +421,10 @@ migrate_account_to_uoa (TpAccountManager *am,
tp_account_request_set_enabled (ar, FALSE);
supersedes = tp_account_get_supersedes (account);
- while (*supersedes != NULL)
- tp_account_request_add_supersedes (ar, *supersedes);
+
+ for (i = 0; supersedes[i] != NULL; i++)
+ tp_account_request_add_supersedes (ar, supersedes[i]);
+
tp_account_request_add_supersedes (ar,
tp_proxy_get_object_path (account));