aboutsummaryrefslogtreecommitdiff
path: root/gdb/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/utils.c')
-rw-r--r--gdb/utils.c36
1 files changed, 15 insertions, 21 deletions
diff --git a/gdb/utils.c b/gdb/utils.c
index af58219..e903aa8 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -1037,26 +1037,6 @@ nomem (long size)
}
}
-void *
-xmcalloc (void *md, size_t number, size_t size)
-{
- void *mem;
-
- /* See libiberty/xmalloc.c. This function need's to match that's
- semantics. It never returns NULL. */
- if (number == 0 || size == 0)
- {
- number = 1;
- size = 1;
- }
-
- mem = mcalloc (md, number, size);
- if (mem == NULL)
- nomem (number * size);
-
- return mem;
-}
-
void
xmfree (void *md, void *ptr)
{
@@ -1113,7 +1093,21 @@ xrealloc (PTR ptr, size_t size) /* OK: PTR */
PTR /* OK: PTR */
xcalloc (size_t number, size_t size)
{
- return xmcalloc (NULL, number, size);
+ void *mem;
+
+ /* See libiberty/xmalloc.c. This function need's to match that's
+ semantics. It never returns NULL. */
+ if (number == 0 || size == 0)
+ {
+ number = 1;
+ size = 1;
+ }
+
+ mem = calloc (number, size); /* OK: xcalloc */
+ if (mem == NULL)
+ nomem (number * size);
+
+ return mem;
}
void