Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
We don't intend to support pre-ansi platforms, so cleanup mmalloc code
[simgrid.git] / src / xbt / mmalloc / mrealloc.c
index e2004aa..866abcf 100644 (file)
@@ -31,14 +31,11 @@ Boston, MA 02111-1307, USA.
    new region.  This module has incestuous knowledge of the
    internals of both mfree and mmalloc. */
 
-PTR
-mrealloc (md, ptr, size)
-  PTR md;
-  PTR ptr;
-  size_t size;
+void*
+mrealloc (void *md, void *ptr, size_t size)
 {
   struct mdesc *mdp;
-  PTR result;
+  void* result;
   int type;
   size_t block, blocks, oldlimit;
 
@@ -145,19 +142,20 @@ mrealloc (md, ptr, size)
   return (result);
 }
 
+/* Useless prototype to make gcc happy */
+void *realloc (void *ptr, size_t size);
+
 /* When using this package, provide a version of malloc/realloc/free built
    on top of it, so that if we use the default sbrk() region we will not
    collide with another malloc package trying to do the same thing, if
    the application contains any "hidden" calls to malloc/realloc/free (such
    as inside a system library). */
 
-PTR
-realloc (ptr, size)
-  PTR ptr;
-  size_t size;
+void *
+realloc (void *ptr, size_t size)
 {
-  PTR result;
+  void* result;
 
-  result = mrealloc ((PTR) NULL, ptr, size);
+  result = mrealloc (NULL, ptr, size);
   return (result);
 }