{
hashtItem *htip;
- htip = Safe_calloc (1, sizeof (hashtItem));
+ htip = Safe_alloc ( sizeof (hashtItem));
htip->key = key;
htip->pkey = pkey;
{
hTab *htab;
- htab = Safe_calloc (1, sizeof (hTab));
+ htab = Safe_alloc ( sizeof (hTab));
- if (!(htab->table = calloc ((size + 1), sizeof (hashtItem *))))
+ if (!(htab->table = Safe_alloc ((size + 1) * sizeof (hashtItem *))))
{
fprintf (stderr, "out of virtual memory %s %d\n",
__FILE__, (size + 1) * sizeof (hashtItem *));
jn = jc->next;
while (jc)
{
- free (jc);
+ Safe_free (jc);
if ((jc = jn))
jn = jc->next;
}
p->table[i] = NULL;
}
- free (p->table);
+ Safe_free (p->table);
}
}
/* First, delete any that currently exist */
hTabDeleteByKey (h, key, szKey, _compare);
/* Now add in ours */
- hTabAddItemLong (h, key, gc_strdup (szKey), gc_strdup (szValue));
+ hTabAddItemLong (h, key, Safe_strdup (szKey), Safe_strdup (szValue));
}
const char *