=================================================================== RCS file: /cvs/mandoc/mandocdb.c,v retrieving revision 1.151 retrieving revision 1.152 diff -u -p -r1.151 -r1.152 --- mandoc/mandocdb.c 2014/06/20 01:21:48 1.151 +++ mandoc/mandocdb.c 2014/06/20 02:24:40 1.152 @@ -1,4 +1,4 @@ -/* $Id: mandocdb.c,v 1.151 2014/06/20 01:21:48 schwarze Exp $ */ +/* $Id: mandocdb.c,v 1.152 2014/06/20 02:24:40 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze @@ -145,8 +145,8 @@ static int dbopen(int); static void dbprune(void); static void filescan(const char *); static void *hash_alloc(size_t, void *); -static void hash_free(void *, size_t, void *); -static void *hash_halloc(size_t, void *); +static void hash_free(void *, void *); +static void *hash_calloc(size_t, size_t, void *); static void mlink_add(struct mlink *, const struct stat *); static void mlink_check(struct mpage *, struct mlink *); static void mlink_free(struct mlink *); @@ -336,8 +336,8 @@ main(int argc, char *argv[]) memset(&dirs, 0, sizeof(struct manpaths)); mpages_info.alloc = mlinks_info.alloc = hash_alloc; - mpages_info.halloc = mlinks_info.halloc = hash_halloc; - mpages_info.hfree = mlinks_info.hfree = hash_free; + mpages_info.calloc = mlinks_info.calloc = hash_calloc; + mpages_info.free = mlinks_info.free = hash_free; mpages_info.key_offset = offsetof(struct mpage, inodev); mlinks_info.key_offset = offsetof(struct mlink, file); @@ -1088,8 +1088,8 @@ mpages_merge(struct mchars *mc, struct mparse *mp) enum mandoclevel lvl; str_info.alloc = hash_alloc; - str_info.halloc = hash_halloc; - str_info.hfree = hash_free; + str_info.calloc = hash_calloc; + str_info.free = hash_free; str_info.key_offset = offsetof(struct str, key); if (0 == nodb) @@ -2348,10 +2348,10 @@ prepare_statements: } static void * -hash_halloc(size_t sz, void *arg) +hash_calloc(size_t n, size_t sz, void *arg) { - return(mandoc_calloc(1, sz)); + return(mandoc_calloc(n, sz)); } static void * @@ -2362,7 +2362,7 @@ hash_alloc(size_t sz, void *arg) } static void -hash_free(void *p, size_t sz, void *arg) +hash_free(void *p, void *arg) { free(p);