-/* $Id: reckeys.c,v 1.5 2006-05-22 13:28:00 adam Exp $
+/* $Id: reckeys.c,v 1.8 2006-10-29 17:20:01 adam Exp $
Copyright (C) 1995-2006
Index Data ApS
for more details.
You should have received a copy of the GNU General Public License
-along with Zebra; see the file LICENSE.zebra. If not, write to the
-Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA.
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
*/
#include <stdio.h>
{
unsigned h = 0;
size_t i;
+ int j;
for (i = 0; i<len; i++)
h = h * 65509 + buf[i];
- for (i = 0; i<key->len; i++)
- h = h * 65509 + key->mem[i];
+ for (j = 0; j<key->len; j++)
+ h = h * 65509 + CAST_ZINT_TO_INT(key->mem[j]);
return &p->entries[h % (unsigned) p->hash_size];
}
}
}
-zebra_rec_keys_t zebra_rec_keys_open()
+zebra_rec_keys_t zebra_rec_keys_open(void)
{
zebra_rec_keys_t p = xmalloc(sizeof(*p));
p->buf_used = 0;