This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Increment
- From: Ian Lance Taylor <ian at airs dot com>
- To: dj at redhat dot com
- Cc: binutils at sourceware dot org
- Date: 26 May 2006 14:46:47 -0700
- Subject: Increment
bfd_hash_lookup in bfd/hash.c has an incorrectly indented and
misplaced increment of table->count:
if (copy)
{
char *new;
table->count ++;
new = objalloc_alloc ((struct objalloc *) table->memory, len + 1);
if (!new)
{
bfd_set_error (bfd_error_no_memory);
return NULL;
}
memcpy (new, string, len + 1);
string = new;
}
Shouldn't that be incremented regardless of whether COPY is true?
Bug or error?
Ian