1/* xreall.c 2 Realloc a block of memory without fail. Supposedly some versions of 3 realloc can't handle a NULL first argument, so we check for that 4 here. */ 5 6#include "uucp.h" 7 8#include "uudefs.h" 9 10pointer 11xrealloc (p, c) 12 pointer p; 13 size_t c; 14{ 15 pointer pret; 16 17 if (p == NULL) 18 return xmalloc (c); 19 pret = realloc (p, c); 20 if (pret == NULL && c != 0) 21 ulog (LOG_FATAL, "Out of memory"); 22 return pret; 23} 24