chiark / gitweb /
Change to arena `realloc' interface, to fix a design bug.
[mLib] / hash.c
diff --git a/hash.c b/hash.c
index 3945755004ca82fa7dc3907ce1fb9fd0961d874e..9483e103d57349aec352a0928a74ffa2c83823b8 100644 (file)
--- 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;