/* Virtual array support.
- Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008
Free Software Foundation, Inc.
Contributed by Cygnus Solutions.
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;
}
slot = (struct varray_descriptor **)
htab_find_slot_with_hash (varray_hash, name,
htab_hash_pointer (name),
- 1);
+ INSERT);
if (*slot)
return *slot;
- *slot = xcalloc (sizeof (**slot), 1);
+ *slot = XCNEW (struct varray_descriptor);
(*slot)->name = name;
return *slot;
}