X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/mLib/blobdiff_plain/20eb516fdebd2fb901e6a09ffa7e741cfb8e3a83..cffeea45b3a4b1bd9d585ef62bf42fd417733499:/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;