summaryrefslogtreecommitdiff
path: root/linkhash.c
diff options
context:
space:
mode:
authorEric Haszlakiewicz <erh+git@nimenees.com>2013-02-09 16:35:24 -0600
committerEric Haszlakiewicz <erh+git@nimenees.com>2013-02-09 16:35:24 -0600
commitca8b27d1836ff97935d2eb212f762f63b9258cbd (patch)
tree43a44a037bfa29c45738c8310640b6053f225e22 /linkhash.c
parent92d289f5d366058284b69180c3c32ea10ef51610 (diff)
Enable -Werror and fix a number of minor warnings that existed.
Diffstat (limited to 'linkhash.c')
-rw-r--r--linkhash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/linkhash.c b/linkhash.c
index 2661823..5043148 100644
--- a/linkhash.c
+++ b/linkhash.c
@@ -134,7 +134,7 @@ int lh_table_insert(struct lh_table *t, void *k, const void *v)
while( 1 ) {
if(t->table[n].k == LH_EMPTY || t->table[n].k == LH_FREED) break;
t->collisions++;
- if(++n == t->size) n = 0;
+ if ((int)++n == t->size) n = 0;
}
t->table[n].k = k;
@@ -166,7 +166,7 @@ struct lh_entry* lh_table_lookup_entry(struct lh_table *t, const void *k)
if(t->table[n].k == LH_EMPTY) return NULL;
if(t->table[n].k != LH_FREED &&
t->equal_fn(t->table[n].k, k)) return &t->table[n];
- if(++n == t->size) n = 0;
+ if ((int)++n == t->size) n = 0;
count++;
}
return NULL;