aboutsummaryrefslogtreecommitdiff
path: root/gcc/ebitmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ebitmap.c')
-rw-r--r--gcc/ebitmap.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/ebitmap.c b/gcc/ebitmap.c
index 8a7c7cb..d25a163 100644
--- a/gcc/ebitmap.c
+++ b/gcc/ebitmap.c
@@ -118,7 +118,7 @@ ebitmap_array_grow (ebitmap map, unsigned int newsize)
newsize += newsize / 4;
map->n_elts = newsize;
- map->elts = xrealloc (map->elts, sizeof (EBITMAP_ELT_TYPE) * newsize);
+ map->elts = XRESIZEVEC (EBITMAP_ELT_TYPE, map->elts, newsize);
}
/* Grow the internal word array for MAP so it is at least SIZE
@@ -161,7 +161,7 @@ ebitmap_array_init (ebitmap map, unsigned int size)
{
if (size > 0)
{
- map->elts = xmalloc (sizeof (EBITMAP_ELT_TYPE) * size);
+ map->elts = XNEWVEC (EBITMAP_ELT_TYPE, size);
map->n_elts = size;
}
else
@@ -202,7 +202,7 @@ ebitmap_clear (ebitmap map)
ebitmap
ebitmap_alloc (unsigned int size)
{
- ebitmap ret = xmalloc (sizeof (struct ebitmap_def));
+ ebitmap ret = XNEW (struct ebitmap_def);
if (size == 0)
size = EBITMAP_ELT_BITS;
ebitmap_array_init (ret, (size + EBITMAP_ELT_BITS - 1) / EBITMAP_ELT_BITS);
@@ -595,7 +595,7 @@ ebitmap_ior_into (ebitmap dst, ebitmap src)
}
}
newarraysize = src->numwords + dst->numwords;
- newarray = xmalloc (newarraysize * sizeof (EBITMAP_ELT_TYPE));
+ newarray = XNEWVEC (EBITMAP_ELT_TYPE, newarraysize);
EXECUTE_IF_SET_IN_SBITMAP (tempmask, 0, i, sbi)
{
@@ -704,7 +704,7 @@ ebitmap_ior (ebitmap dst, ebitmap src1, ebitmap src2)
}
}
newarraysize = src1->numwords + src2->numwords;
- newarray = xmalloc (newarraysize * sizeof (EBITMAP_ELT_TYPE));
+ newarray = XNEWVEC (EBITMAP_ELT_TYPE, newarraysize);
EXECUTE_IF_SET_IN_SBITMAP (tempmask, 0, i, sbi)
{
@@ -883,7 +883,7 @@ ebitmap_and_compl (ebitmap dst, ebitmap src1, ebitmap src2)
sbitmap_copy (tempmask, src1->wordmask);
newarraysize = src1->numwords;
- newarray = xmalloc (newarraysize * sizeof (EBITMAP_ELT_TYPE));
+ newarray = XNEWVEC (EBITMAP_ELT_TYPE, newarraysize);
EXECUTE_IF_SET_IN_SBITMAP (src1->wordmask, 0, i, sbi)
{