]> mj.ucw.cz Git - libucw.git/blobdiff - lib/realloc.c
Fixed the yesterday's mysterious bug.
[libucw.git] / lib / realloc.c
index 817f035c92175b1a403d703cde1a72811c78c6f3..6d6b0baf2304b933602f33db7e24cd2ff7a6b033 100644 (file)
@@ -1,18 +1,22 @@
 /*
- *     Sherlock Library -- Memory Re-allocation
+ *     UCW Library -- Memory Re-allocation
  *
  *     (c) 1997 Martin Mares <mj@ucw.cz>
+ *
+ *     This software may be freely distributed and used according to the terms
+ *     of the GNU Lesser General Public License.
  */
 
 #include "lib/lib.h"
 
 #include <stdlib.h>
 
-#ifndef DMALLOC
+#ifndef DEBUG_DMALLOC
 
 void *
 xrealloc(void *old, uns size)
 {
+  /* We assume that realloc(NULL, x) works like malloc(x), which is true with the glibc. */
   void *x = realloc(old, size);
   if (!x)
     die("Cannot reallocate %d bytes of memory", size);