_bfd_alloc_and_read
[deliverable/binutils-gdb.git] / bfd / elfxx-mips.c
index 81ed9b390a041d069163f0be00e84b91a686adee..81af3ef33e5b92f90c8f2d29d239b763ce425b27 100644 (file)
@@ -1424,11 +1424,10 @@ _bfd_mips_elf_read_ecoff_info (bfd *abfd, asection *section,
          bfd_set_error (bfd_error_file_too_big);                       \
          goto error_return;                                            \
        }                                                               \
-      debug->ptr = bfd_malloc (amt);                                   \
-      if (debug->ptr == NULL)                                          \
+      if (bfd_seek (abfd, symhdr->offset, SEEK_SET) != 0)              \
        goto error_return;                                              \
-      if (bfd_seek (abfd, symhdr->offset, SEEK_SET) != 0               \
-         || bfd_bread (debug->ptr, amt, abfd) != amt)                  \
+      debug->ptr = (type) _bfd_malloc_and_read (abfd, amt, amt);       \
+      if (debug->ptr == NULL)                                          \
        goto error_return;                                              \
     } while (0)
 
This page took 0.025657 seconds and 4 git commands to generate.