summaryrefslogtreecommitdiffstats
path: root/src/hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hash.c')
-rw-r--r--src/hash.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/hash.c b/src/hash.c
index 3ed6ad2..553dd1d 100644
--- a/src/hash.c
+++ b/src/hash.c
@@ -53,7 +53,6 @@ hashtable_create(int hashsize, int limit, int datasize,
{
int i;
struct hashtable *h;
- struct hashtype *t;
int size = sizeof(struct hashtable)
+ hashsize * sizeof(struct slist_head);
@@ -87,7 +86,6 @@ void *hashtable_add(struct hashtable *table, void *data)
struct slist_head *e;
struct hashtable_node *n;
u_int32_t id;
- int i;
/* hash table is full */
if (table->count >= table->limit) {
@@ -122,7 +120,6 @@ void *hashtable_test(struct hashtable *table, const void *data)
struct slist_head *e;
u_int32_t id;
struct hashtable_node *n;
- int i;
id = table->hash(data, table);
@@ -141,7 +138,6 @@ int hashtable_del(struct hashtable *table, void *data)
struct slist_head *e, *next, *prev;
u_int32_t id;
struct hashtable_node *n;
- int i;
id = table->hash(data, table);
@@ -160,7 +156,7 @@ int hashtable_del(struct hashtable *table, void *data)
int hashtable_flush(struct hashtable *table)
{
- int i;
+ u_int32_t i;
struct slist_head *e, *next, *prev;
struct hashtable_node *n;
@@ -179,7 +175,7 @@ int hashtable_flush(struct hashtable *table)
int hashtable_iterate(struct hashtable *table, void *data,
int (*iterate)(void *data1, void *data2))
{
- int i;
+ u_int32_t i;
struct slist_head *e, *next, *prev;
struct hashtable_node *n;