This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[Patch]: use arelt_size macro in bfdio.c
- From: Tristan Gingold <gingold at adacore dot com>
- To: binutils Development <binutils at sourceware dot org>
- Date: Wed, 4 Jan 2012 14:27:56 +0100
- Subject: [Patch]: use arelt_size macro in bfdio.c
Hi,
any reason not to use arelt_size macro in bfd_bread ?
(Only manually tested)
Tristan.
bfd/
2012-01-04 Tristan Gingold <gingold@adacore.com>
* bfdio.c (bfd_bread): Use arelt_size macro.
index 841c781..f8c9f3e 100644
--- a/bfd/bfdio.c
+++ b/bfd/bfdio.c
@@ -185,7 +185,7 @@ bfd_bread (void *ptr, bfd_size_type size, bfd *abfd)
this element. */
if (abfd->arelt_data != NULL)
{
- size_t maxbytes = ((struct areltdata *) abfd->arelt_data)->parsed_size;
+ size_t maxbytes = arelt_size (abfd);
if (abfd->where + size > maxbytes)
{
if (abfd->where >= maxbytes)