From 25c6dfd249873bb165a9050950937fa0ea545101 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Thu, 20 Sep 2012 15:01:27 +0200 Subject: 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 --- src/empathy-sanity-cleaning.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/empathy-sanity-cleaning.c') 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)); -- cgit v1.2.3