fixed SIZEOF_LONG==4 assumption with ENABLE_MEM_CHECK, from Art Haas
[platform/upstream/glib.git] / gslist.c
index cc8e906..341d6bd 100644 (file)
--- a/gslist.c
+++ b/gslist.c
@@ -390,11 +390,11 @@ GSList*
 g_slist_reverse (GSList *list)
 {
   GSList *prev = NULL;
-  GSList *next = NULL;
   
   while (list)
     {
-      next = list->next;
+      GSList *next = list->next;
+
       list->next = prev;
       
       prev = list;