From 6113e22d36a991ad9d0c5226aa425c32750d7d98 Mon Sep 17 00:00:00 2001 From: "graham.gower" Date: Wed, 25 Nov 2009 23:22:58 +0000 Subject: [PATCH] Return void, not int. git-svn-id: http://opkg.googlecode.com/svn/trunk@377 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358 --- libopkg/hash_table.c | 6 ++---- libopkg/hash_table.h | 2 +- 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); -- 2.25.1