]> mj.ucw.cz Git - libucw.git/blob - lib/realloc.c
78c6b19b9cfa204178b5c797a397f4fb825a9446
[libucw.git] / lib / realloc.c
1 /*
2  *      Sherlock Library -- Memory Re-allocation
3  *
4  *      (c) 1997 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
5  */
6
7 #include <stdio.h>
8 #include <stdlib.h>
9
10 #include "lib.h"
11
12 void *
13 xrealloc(void *old, uns size)
14 {
15   void *x = realloc(old, size);
16   if (!x)
17     die("Cannot reallocate %d bytes of memory", size);
18   return x;
19 }