]> mj.ucw.cz Git - libucw.git/blob - lib/realloc.c
Put back the work-around for objects generated by an old version of the
[libucw.git] / lib / realloc.c
1 /*
2  *      Sherlock Library -- Memory Re-allocation
3  *
4  *      (c) 1997 Martin Mares <mj@ucw.cz>
5  *
6  *      This software may be freely distributed and used according to the terms
7  *      of the GNU Lesser General Public License.
8  */
9
10 #include "lib/lib.h"
11
12 #include <stdlib.h>
13
14 #ifndef DMALLOC
15
16 void *
17 xrealloc(void *old, uns size)
18 {
19   void *x = realloc(old, size);
20   if (!x)
21     die("Cannot reallocate %d bytes of memory", size);
22   return x;
23 }
24
25 #endif