]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix type of parameter passed by malloc_consolidate
authorTulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
Fri, 11 Mar 2016 19:57:38 +0000 (16:57 -0300)
committerTulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
Fri, 11 Mar 2016 21:09:40 +0000 (18:09 -0300)
atomic_exchange_acq() expected a pointer, but was receiving an integer.

ChangeLog
malloc/malloc.c

index 440b0212d2bb470fe4b87283ba58839367b96c19..99fe2c9ac8f2fb66984707b8944fcf178bbadd9d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-03-11  Tulio Magno Quites Machado Filho  <tuliom@linux.vnet.ibm.com>
+
+       * malloc/malloc.c (malloc_consolidate): Replace 0 by NULL in
+       order to match the type of p when calling atomic_exchange_acq().
+
 2016-03-11  Rajalakshmi Srinivasaraghavan  <raji@linux.vnet.ibm.com>
 
        * sysdeps/powerpc/powerpc32/power4/memcmp.S (memcmp): Rearrange
index b8a43bfb32bcd97a6ed468cb7635b4bbfef2e3a2..1eed79414c585e961ec22fc28c462a07058ce4a6 100644 (file)
@@ -4150,7 +4150,7 @@ static void malloc_consolidate(mstate av)
     maxfb = &fastbin (av, NFASTBINS - 1);
     fb = &fastbin (av, 0);
     do {
-      p = atomic_exchange_acq (fb, 0);
+      p = atomic_exchange_acq (fb, NULL);
       if (p != 0) {
        do {
          check_inuse_chunk(av, p);