This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]