summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgraham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2009-11-25 18:22:58 (EST)
committer graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2009-11-25 18:22:58 (EST)
commit6113e22d36a991ad9d0c5226aa425c32750d7d98 (patch)
treea63e23a6919b21665bc0469a74c4c2533b400ece
parent207b2e92bafce33ace36d33169ce51df35d7ee7a (diff)
Return void, not int.
git-svn-id: http://opkg.googlecode.com/svn/trunk@377 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
-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);