General Public License for more details.
*/
-#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*
* this is an open table keyed by strings
*/
-int
+void
hash_table_init(const char *name, hash_table_t *hash, int len)
{
if (hash->entries != NULL) {
fprintf(stderr, "ERROR: %s called on a non empty hash table\n",
__FUNCTION__);
- return -1;
+ return;
}
memset(hash, 0, sizeof(hash_table_t));
hash->name = name;
hash->n_buckets = len;
hash->entries = xcalloc(hash->n_buckets, sizeof(hash_entry_t));
-
- return 0;
}
void