From e80dd3006171b33705395b0c7547f03925670bf9 Mon Sep 17 00:00:00 2001 From: epochqwert Date: Wed, 4 Feb 2015 03:28:30 -0600 Subject: a round of warnings on Linux fixed. --- libhashtable/libhashtable.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libhashtable') diff --git a/libhashtable/libhashtable.c b/libhashtable/libhashtable.c index 38b4ad3..02b981e 100644 --- a/libhashtable/libhashtable.c +++ b/libhashtable/libhashtable.c @@ -88,10 +88,11 @@ void ht_freevalues(struct hashtable *ht) { //this seems too complicated. int ht_setkey(struct hashtable *ht,char *key,void *value) { - if(!key) key="(null)"; - unsigned short h=hash(key); + unsigned short h; struct entry *tmp; int i; + if(!key) key="(null)"; + h=hash(key); for(i=0;ikl;i++) { if(ht->keys[i]==h) break; } -- cgit v1.2.3