unsigned
hsh_hash_bytes (const void *buf_, size_t size)
{
- const unsigned char *buf = buf_;
+ const unsigned char *buf = (const unsigned char *) buf_;
unsigned hash;
assert (buf != NULL);
unsigned
hsh_hash_string (const char *s_)
{
- const unsigned char *s = s_;
+ const unsigned char *s = (const unsigned char *) s_;
unsigned hash;
assert (s != NULL);
unsigned
hsh_hash_case_string (const char *s_)
{
- const unsigned char *s = s_;
+ const unsigned char *s = (const unsigned char *) s_;
unsigned hash;
assert (s != NULL);
if (size < 4)
size = 4;
h->size = next_power_of_2 (size);
- h->entries = xmalloc (sizeof *h->entries * h->size);
+ h->entries = xnmalloc (h->size, sizeof *h->entries);
for (i = 0; i < h->size; i++)
h->entries[i] = NULL;
h->aux = aux;
end = begin + h->size;
h->size = new_size;
- h->entries = xmalloc (sizeof *h->entries * h->size);
+ h->entries = xnmalloc (h->size, sizeof *h->entries);
for (i = 0; i < h->size; i++)
h->entries[i] = NULL;
for (table_p = begin; table_p < end; table_p++)
void **copy;
assert (h != NULL);
- copy = xmalloc ((h->used + 1) * sizeof *copy);
+ copy = xnmalloc ((h->used + 1), sizeof *copy);
copy_if (h->entries, h->size, sizeof *h->entries, copy, not_null, NULL);
copy[h->used] = NULL;
return copy;