This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Increment


On Fri, May 26, 2006 at 02:46:47PM -0700, Ian Lance Taylor wrote:
> bfd_hash_lookup in bfd/hash.c has an incorrectly indented and
> misplaced increment of table->count:

This seems to have fallen through the cracks.  Applying the obvious
fix.

	* hash.c (bfd_hash_lookup): Correct stray line.

Index: bfd/hash.c
===================================================================
RCS file: /cvs/src/src/bfd/hash.c,v
retrieving revision 1.22
diff -u -p -r1.22 hash.c
--- bfd/hash.c	3 May 2006 04:20:52 -0000	1.22
+++ bfd/hash.c	6 Jun 2006 03:02:53 -0000
@@ -455,7 +455,6 @@ bfd_hash_lookup (struct bfd_hash_table *
   if (copy)
     {
       char *new;
-  table->count ++;
 
       new = objalloc_alloc ((struct objalloc *) table->memory, len + 1);
       if (!new)
@@ -470,6 +469,7 @@ bfd_hash_lookup (struct bfd_hash_table *
   hashp->hash = hash;
   hashp->next = table->table[index];
   table->table[index] = hashp;
+  table->count++;
 
   if (table->count > table->size * 3 / 4)
     {

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]