summaryrefslogtreecommitdiffstats
path: root/libopkg
diff options
context:
space:
mode:
Diffstat (limited to 'libopkg')
-rw-r--r--libopkg/hash_table.c6
-rw-r--r--libopkg/hash_table.h2
2 files changed, 3 insertions, 5 deletions
diff --git a/libopkg/hash_table.c b/libopkg/hash_table.c
index 181d319..1bc621c 100644
--- a/libopkg/hash_table.c
+++ b/libopkg/hash_table.c
@@ -43,13 +43,13 @@ hash_index(hash_table_t *hash, const char *key)
/*
* 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));
@@ -57,8 +57,6 @@ hash_table_init(const char *name, hash_table_t *hash, int len)
hash->name = name;
hash->n_buckets = len;
hash->entries = xcalloc(hash->n_buckets, sizeof(hash_entry_t));
-
- return 0;
}
void
diff --git a/libopkg/hash_table.h b/libopkg/hash_table.h
index 52b44d9..9fa926f 100644
--- a/libopkg/hash_table.h
+++ b/libopkg/hash_table.h
@@ -40,7 +40,7 @@ struct hash_table {
unsigned int n_hits, n_misses;
};
-int hash_table_init(const char *name, hash_table_t *hash, int len);
+void hash_table_init(const char *name, hash_table_t *hash, int len);
void hash_table_deinit(hash_table_t *hash);
void hash_print_stats(hash_table_t *hash);
void *hash_table_get(hash_table_t *hash, const char *key);