diff options
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r-- | gcc/gcc.c | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -5219,14 +5219,18 @@ xmalloc (size) } PTR -xrealloc (ptr, size) - PTR ptr; +xrealloc (old, size) + PTR old; size_t size; { - register PTR value = (PTR) realloc (ptr, size); - if (value == 0) + register PTR ptr; + if (ptr) + ptr = (PTR) realloc (old, size); + else + ptr = (PTR) malloc (size); + if (ptr == 0) fatal ("virtual memory exhausted"); - return value; + return ptr; } static char * |