X-Git-Url: https://the.earth.li/gitweb/?a=blobdiff_plain;f=hash.c;h=62be39403cea96d40d84255a6f1af1aae680a3c9;hb=6df51fef2960f533a741fb7290867387ed3fbba5;hp=9ee8b9bd62e9d4203743d3fd16f635b268340845;hpb=0f4971d043c38bae1bfb95201622a1405110f899;p=onak.git diff --git a/hash.c b/hash.c index 9ee8b9b..62be394 100644 --- a/hash.c +++ b/hash.c @@ -1,11 +1,19 @@ /* * hash.c - hashing routines mainly used for caching key details. * - * Jonathan McDowell + * Copyright 2000-2002 Jonathan McDowell * - * Copyright 2000-2002 Project Purple + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; version 2 of the License. * - * $Id: hash.c,v 1.8 2003/06/04 20:57:08 noodles Exp $ + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . */ #include @@ -16,6 +24,7 @@ #include "keystructs.h" #include "ll.h" #include "mem.h" +#include "stats.h" /** * hashtable - the hash table array. @@ -57,7 +66,7 @@ void destroyhash(void) * TODO: The problem is the object has pointers that * need freed too. */ - llfree(curll, free_statskey); + llfree(curll, (void (*)(void *)) free_statskey); hashtable[i] = NULL; } elements = 0; @@ -123,7 +132,7 @@ unsigned long hashelements(void) return elements; } -struct ll *gethashtableentry(int entry) +struct ll *gethashtableentry(unsigned int entry) { return hashtable[entry]; }