X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/mLib/blobdiff_plain/d94be36654214c09fa6510611658325a84d5cfa7..b5ea4de3ac1c61ef84c21f4e3ceff2181d23e456:/hash.c diff --git a/hash.c b/hash.c index 3945755..9483e10 100644 --- a/hash.c +++ b/hash.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: hash.c,v 1.2 2000/06/17 10:37:39 mdw Exp $ + * $Id: hash.c,v 1.3 2000/07/16 12:29:16 mdw Exp $ * * General hashtable infrastructure * @@ -30,6 +30,9 @@ /*----- Revision history --------------------------------------------------* * * $Log: hash.c,v $ + * Revision 1.3 2000/07/16 12:29:16 mdw + * Change to arena `realloc' interface, to fix a design bug. + * * Revision 1.2 2000/06/17 10:37:39 mdw * Add support for arena management. * @@ -124,7 +127,9 @@ int hash_extend(hash_table *t) /* --- Allocate a new hash bin vector --- */ - if ((v = A_REALLOC(t->a, t->v, m * 2 * sizeof(hash_base *))) == 0) { + if ((v = A_REALLOC(t->a, t->v, + 2 * m * sizeof(hash_base *), + m * sizeof(hash_base *))) == 0) { return (0); } t->v = v;