[empathy] migrate_account_to_uoa: actually iterate over the supersedes array



commit 25c6dfd249873bb165a9050950937fa0ea545101
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Thu Sep 20 15:01:27 2012 +0200

    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 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/empathy-sanity-cleaning.c b/src/empathy-sanity-cleaning.c
index 60cecc9..e3688c6 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));
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]