aboutsummaryrefslogtreecommitdiff
path: root/gcc/genattrtab.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/genattrtab.c')
-rw-r--r--gcc/genattrtab.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c
index fc2f884..cfe2757 100644
--- a/gcc/genattrtab.c
+++ b/gcc/genattrtab.c
@@ -5753,14 +5753,18 @@ extend_range (range, min, max)
}
PTR
-xrealloc (ptr, size)
- PTR ptr;
+xrealloc (old, size)
+ PTR old;
size_t size;
{
- register PTR result = (PTR) realloc (ptr, size);
- if (!result)
+ register PTR ptr;
+ if (ptr)
+ ptr = (PTR) realloc (old, size);
+ else
+ ptr = (PTR) malloc (size);
+ if (!ptr)
fatal ("virtual memory exhausted");
- return result;
+ return ptr;
}
PTR