[Xfce4-commits] <libxfce4util:master> Use chain to free slice instead of a loop.

Nick Schermer noreply at xfce.org
Mon Jun 27 19:28:02 CEST 2011


Updating branch refs/heads/master
         to 818c1257e91f2661012e8cfde519bbe4db42342a (commit)
       from a2c92c3412c682c632ea71829ccd181f6347e3c2 (commit)

commit 818c1257e91f2661012e8cfde519bbe4db42342a
Author: Nick Schermer <nick at xfce.org>
Date:   Mon Jun 27 17:49:41 2011 +0200

    Use chain to free slice instead of a loop.

 libxfce4util/xfce-rc-simple.c |   12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)

diff --git a/libxfce4util/xfce-rc-simple.c b/libxfce4util/xfce-rc-simple.c
index 13bb5e5..929138f 100644
--- a/libxfce4util/xfce-rc-simple.c
+++ b/libxfce4util/xfce-rc-simple.c
@@ -557,18 +557,8 @@ simple_write (XfceRcSimple *simple, const gchar *filename)
 static void
 simple_entry_free (Entry *entry)
 {
-  LEntry *lentry;
-  LEntry *next;
-
   /* release all lentries */
-  for (lentry = entry->lfirst; lentry != NULL; lentry = next)
-    {
-      /* determine the next lentry */
-      next = lentry->next;
-
-      /* release this lentry */
-      g_slice_free (LEntry, lentry);
-    }
+  g_slice_free_chain (LEntry, entry->lfirst, next);
 
   /* release the entry */
   g_slice_free (Entry, entry);



More information about the Xfce4-commits mailing list