[llvm-commits] [GNU_GCC] CVS: llvm-gcc/libiberty/hashtab.c

John Criswell criswell at cs.uiuc.edu
Mon Mar 15 09:41:02 PST 2004


Changes in directory llvm-gcc/libiberty:

hashtab.c updated: 1.1.1.1 -> 1.1.1.2

---
Log message:

Updated to revision 1.38 from the GCC sources.  This fixes a minor bug
and might help prevent segfaults.



---
Diffs of the changes:  (+2 -2)

Index: llvm-gcc/libiberty/hashtab.c
diff -u llvm-gcc/libiberty/hashtab.c:1.1.1.1 llvm-gcc/libiberty/hashtab.c:1.1.1.2
--- llvm-gcc/libiberty/hashtab.c:1.1.1.1	Thu Jan  8 15:59:18 2004
+++ llvm-gcc/libiberty/hashtab.c	Mon Mar 15 09:40:06 2004
@@ -535,14 +535,14 @@
   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];
 }
 





More information about the llvm-commits mailing list