From: msnyder@sonic.net
To: binutils@sourceware.org
Subject: [PATCH] elf.c, remove effectless increment
Date: Wed, 25 Jul 2007 21:26:00 -0000 [thread overview]
Message-ID: <6532.12.7.175.2.1185398583.squirrel@webmail.sonic.net> (raw)
[-- 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);
next reply other threads:[~2007-07-25 21:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-25 21:26 msnyder [this message]
2007-07-26 6:27 ` Alan Modra
2007-07-26 18:18 ` msnyder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6532.12.7.175.2.1185398583.squirrel@webmail.sonic.net \
--to=msnyder@sonic.net \
--cc=binutils@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).