public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] elf.c, remove effectless increment
@ 2007-07-25 21:26 msnyder
  2007-07-26  6:27 ` Alan Modra
  0 siblings, 1 reply; 3+ messages in thread
From: msnyder @ 2007-07-25 21:26 UTC (permalink / raw)
  To: binutils

[-- Attachment #1: Type: text/plain, Size: 138 bytes --]

No point incrementing the pointer 's', which is
  a) uninitialized
  b) not used in the loop, and
  c) assigned to right after the loop.


[-- Attachment #2: s.txt --]
[-- Type: text/plain, Size: 982 bytes --]

2007-07-25  Michael Snyder  <msnyder@access-company.com>

	* elf.c (_bfd_elf_get_synthetic_symtab): Remove meaningless 
	pointer increment.

Index: elf.c
===================================================================
RCS file: /cvs/src/src/bfd/elf.c,v
retrieving revision 1.400
diff -p -r1.400 elf.c
*** elf.c	24 Jul 2007 08:09:20 -0000	1.400
--- elf.c	25 Jul 2007 21:19:28 -0000
*************** _bfd_elf_get_synthetic_symtab (bfd *abfd
*** 8419,8425 ****
    count = relplt->size / hdr->sh_entsize;
    size = count * sizeof (asymbol);
    p = relplt->relocation;
!   for (i = 0; i < count; i++, s++, p++)
      size += strlen ((*p->sym_ptr_ptr)->name) + sizeof ("@plt");
  
    s = *ret = bfd_malloc (size);
--- 8419,8425 ----
    count = relplt->size / hdr->sh_entsize;
    size = count * sizeof (asymbol);
    p = relplt->relocation;
!   for (i = 0; i < count; i++, p++)
      size += strlen ((*p->sym_ptr_ptr)->name) + sizeof ("@plt");
  
    s = *ret = bfd_malloc (size);

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

* Re: [PATCH] elf.c, remove effectless increment
  2007-07-25 21:26 [PATCH] elf.c, remove effectless increment msnyder
@ 2007-07-26  6:27 ` Alan Modra
  2007-07-26 18:18   ` msnyder
  0 siblings, 1 reply; 3+ messages in thread
From: Alan Modra @ 2007-07-26  6:27 UTC (permalink / raw)
  To: msnyder; +Cc: binutils

On Wed, Jul 25, 2007 at 02:23:03PM -0700, msnyder@sonic.net wrote:
> No point incrementing the pointer 's', which is
>   a) uninitialized
>   b) not used in the loop, and
>   c) assigned to right after the loop.
> 

> 2007-07-25  Michael Snyder  <msnyder@access-company.com>
> 
> 	* elf.c (_bfd_elf_get_synthetic_symtab): Remove meaningless 
> 	pointer increment.

OK.

-- 
Alan Modra
Australia Development Lab, IBM

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

* Re: [PATCH] elf.c, remove effectless increment
  2007-07-26  6:27 ` Alan Modra
@ 2007-07-26 18:18   ` msnyder
  0 siblings, 0 replies; 3+ messages in thread
From: msnyder @ 2007-07-26 18:18 UTC (permalink / raw)
  To: binutils

> On Wed, Jul 25, 2007 at 02:23:03PM -0700, msnyder@sonic.net wrote:
>> No point incrementing the pointer 's', which is
>>   a) uninitialized
>>   b) not used in the loop, and
>>   c) assigned to right after the loop.
>>
>
>> 2007-07-25  Michael Snyder  <msnyder@access-company.com>
>>
>> 	* elf.c (_bfd_elf_get_synthetic_symtab): Remove meaningless
>> 	pointer increment.
>
> OK.

Thanks, committed.


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

end of thread, other threads:[~2007-07-26 18:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-25 21:26 [PATCH] elf.c, remove effectless increment msnyder
2007-07-26  6:27 ` Alan Modra
2007-07-26 18:18   ` msnyder

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).