summaryrefslogtreecommitdiff
path: root/gcc/varray.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/varray.c')
-rw-r--r--gcc/varray.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/varray.c b/gcc/varray.c
index 45330397e0e..6464a816652 100644
--- a/gcc/varray.c
+++ b/gcc/varray.c
@@ -49,13 +49,13 @@ static htab_t varray_hash;
static hashval_t
hash_descriptor (const void *p)
{
- const struct varray_descriptor *d = p;
+ const struct varray_descriptor *d = (const struct varray_descriptor *) p;
return htab_hash_pointer (d->name);
}
static int
eq_descriptor (const void *p1, const void *p2)
{
- const struct varray_descriptor *d = p1;
+ const struct varray_descriptor *d = (const struct varray_descriptor *) p1;
return d->name == p2;
}
@@ -74,7 +74,7 @@ varray_descriptor (const char *name)
1);
if (*slot)
return *slot;
- *slot = xcalloc (sizeof (**slot), 1);
+ *slot = XCNEW (struct varray_descriptor);
(*slot)->name = name;
return *slot;
}