diff options
author | epochqwert <epoch@53flpnlls43fcguy.onion> | 2015-02-04 03:28:30 -0600 |
---|---|---|
committer | epochqwert <epoch@53flpnlls43fcguy.onion> | 2015-02-04 03:28:30 -0600 |
commit | e80dd3006171b33705395b0c7547f03925670bf9 (patch) | |
tree | 0588ce56dc4ab3cc824bb600698025e0c031bc63 /libhashtable | |
parent | 1b0d057b5068a5526aef1a5b1a2338d9f3bc6ef3 (diff) | |
download | segfault-e80dd3006171b33705395b0c7547f03925670bf9.tar.gz segfault-e80dd3006171b33705395b0c7547f03925670bf9.zip |
a round of warnings on Linux fixed.
Diffstat (limited to 'libhashtable')
-rw-r--r-- | libhashtable/libhashtable.c | 5 |
1 files changed, 3 insertions, 2 deletions
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;i<ht->kl;i++) { if(ht->keys[i]==h) break; } |