]> git.0d.be Git - empathy.git/commitdiff
migrate_account_to_uoa: actually iterate over the supersedes array
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Thu, 20 Sep 2012 13:01:27 +0000 (15:01 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Fri, 21 Sep 2012 06:46:29 +0000 (08:46 +0200)
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

index 60cecc9722c8bf047fb4da6144a3465037a01901..e3688c6c41b5b72d4e9fdb3c2f605f033511af2d 100644 (file)
@@ -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));