telepathy-mission-control: mcd_storage_load: convert while loop into for loop

Simon McVittie smcv at kemper.freedesktop.org
Thu Jan 30 04:34:41 PST 2014


Module: telepathy-mission-control
Branch: master
Commit: 443a396b555635313f12163b0351f81fc63576ad
URL:    http://cgit.freedesktop.org/telepathy/telepathy-mission-control/commit/?id=443a396b555635313f12163b0351f81fc63576ad

Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Fri Nov 15 13:17:24 2013 +0000

mcd_storage_load: convert while loop into for loop

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727

---

 src/mcd-storage.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/mcd-storage.c b/src/mcd-storage.c
index 0ded349..35eaed5 100644
--- a/src/mcd-storage.c
+++ b/src/mcd-storage.c
@@ -498,11 +498,9 @@ mcd_storage_load (McdStorage *self)
 
   sort_and_cache_plugins ();
 
-  store = stores;
-
   /* fetch accounts stored in plugins, highest priority first, so that
    * low priority plugins can be overidden by high priority */
-  while (store != NULL)
+  for (store = stores; store != NULL; store = store->next)
     {
       GList *account;
       McpAccountStorage *plugin = store->data;
@@ -530,7 +528,6 @@ mcd_storage_load (McdStorage *self)
 
       /* already freed the contents, just need to free the list itself */
       g_list_free (stored);
-      store = store->next;
     }
 }
 



More information about the telepathy-commits mailing list