chiark / gitweb /
Actually implement the right transformation!
[mLib] / hash.c
diff --git a/hash.c b/hash.c
index 3945755004ca82fa7dc3907ce1fb9fd0961d874e..d18cc003bcebf60bd2344530748b7964e1ca4c0e 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.4 2004/04/08 01:36:11 mdw Exp $
  *
  * General hashtable infrastructure
  *
  * MA 02111-1307, USA.
  */
 
-/*----- Revision history --------------------------------------------------* 
- *
- * $Log: hash.c,v $
- * Revision 1.2  2000/06/17 10:37:39  mdw
- * Add support for arena management.
- *
- * Revision 1.1  1999/08/02 14:45:48  mdw
- * Break low-level hashtable code out from sym.
- *
- */
-
 /*----- Header files ------------------------------------------------------*/
 
 #include <stdio.h>
@@ -124,7 +113,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;