OSDN Git Service

Daily bump.
[pf3gnuchains/gcc-fork.git] / libiberty / hashtab.c
index 5b58d71..231fbc0 100644 (file)
@@ -45,6 +45,10 @@ Boston, MA 02111-1307, USA.  */
 #include <string.h>
 #endif
 
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
+#endif
+
 #include <stdio.h>
 
 #include "libiberty.h"
@@ -531,14 +535,14 @@ htab_find_slot_with_hash (htab, element, hash, insert)
   if (insert == NO_INSERT)
     return NULL;
 
-  htab->n_elements++;
-
   if (first_deleted_slot)
     {
+      htab->n_deleted--;
       *first_deleted_slot = EMPTY_ENTRY;
       return first_deleted_slot;
     }
 
+  htab->n_elements++;
   return &htab->entries[index];
 }
 
@@ -787,7 +791,7 @@ acceptable.  Do NOT use for cryptographic purposes.
 --------------------------------------------------------------------
 */
 
-hashval_t burtle_hash (k_in, length, initval)
+hashval_t iterative_hash (k_in, length, initval)
      const PTR k_in;               /* the key */
      register size_t  length;      /* the length of the key */
      register hashval_t  initval;  /* the previous hash, or an arbitrary value */