[Xfce4-commits] <libxfce4util:xfce-4.8> Use chain to free slice instead of a loop.
Nick Schermer
noreply at xfce.org
Mon Sep 12 20:50:04 CEST 2011
Updating branch refs/heads/xfce-4.8
to 11761db3642d82656387ee803e639776186033a5 (commit)
from cdbf8715fef493edb857f937b94e837698c42e47 (commit)
commit 11761db3642d82656387ee803e639776186033a5
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.
(cherry picked from commit 818c1257e91f2661012e8cfde519bbe4db42342a)
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