[glib] gslice: Fix inline delarations in GSlice



commit 96528396064e8fef757b095957fd6c527d9ac78c
Author: Philip Withnall <withnall endlessm com>
Date:   Thu Aug 3 11:54:58 2017 +0100

    gslice: Fix inline delarations in GSlice
    
    Accidentally introduced in commit
    5cddde1fb2b8466d8104595008eafabd0728de5d.
    
    Signed-off-by: Philip Withnall <withnall endlessm com>

 glib/gslice.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/glib/gslice.c b/glib/gslice.c
index 8be5bad..6ff3597 100644
--- a/glib/gslice.c
+++ b/glib/gslice.c
@@ -1273,13 +1273,18 @@ allocator_add_slab (Allocator *allocator,
   ChunkLink *chunk;
   SlabInfo *sinfo;
   gsize addr, padding, n_chunks, color = 0;
-  gsize page_size = allocator_aligned_page_size (allocator, SLAB_BPAGE_SIZE (allocator, chunk_size));
+  gsize page_size;
   int errsv;
+  gpointer aligned_memory;
+  guint8 *mem;
+  guint i;
+
+  page_size = allocator_aligned_page_size (allocator, SLAB_BPAGE_SIZE (allocator, chunk_size));
   /* allocate 1 page for the chunks and the slab */
-  gpointer aligned_memory = allocator_memalign (page_size, page_size - NATIVE_MALLOC_PADDING);
+  aligned_memory = allocator_memalign (page_size, page_size - NATIVE_MALLOC_PADDING);
   errsv = errno;
-  guint8 *mem = aligned_memory;
-  guint i;
+  mem = aligned_memory;
+
   if (!mem)
     {
       const gchar *syserr = strerror (errsv);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]