public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Increment
@ 2006-05-27 16:33 Ian Lance Taylor
  2006-06-06  4:30 ` Increment Alan Modra
  0 siblings, 1 reply; 17+ messages in thread
From: Ian Lance Taylor @ 2006-05-27 16:33 UTC (permalink / raw)
  To: dj; +Cc: binutils

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2006-06-13 14:49 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-27 16:33 Increment Ian Lance Taylor
2006-06-06  4:30 ` Increment Alan Modra
2006-06-06 10:52   ` Increment Alan Modra
2006-06-07  1:40   ` Increment Thiemo Seufer
2006-06-07  5:02     ` Increment Alan Modra
2006-06-09 13:42   ` Increment Andreas Schwab
2006-06-12  4:32     ` Increment Alan Modra
2006-06-12 10:50       ` Increment Andreas Schwab
2006-06-12 18:53         ` Increment DJ Delorie
2006-06-12 19:13         ` Increment H. J. Lu
2006-06-12 23:55           ` Increment Andreas Schwab
2006-06-13  1:11             ` Increment Alan Modra
2006-06-13 10:52               ` Increment Andreas Schwab
2006-06-13  8:53             ` Increment H. J. Lu
2006-06-13 13:49               ` Increment Andreas Schwab
2006-06-13 14:49                 ` Increment Alan Modra
2006-06-13 14:52                   ` Increment Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).