1999-08-09 Jakub Jelinek <jj@ultra.linux.cz>
[deliverable/binutils-gdb.git] / bfd / nlmcode.h
index e1df043be437047e2e080e522c24bcc3188ce3dd..ad1a2f8355b06b1a220c31717ebf5e1d4c97557b 100644 (file)
@@ -1,5 +1,5 @@
 /* NLM (NetWare Loadable Module) executable support for BFD.
-   Copyright (C) 1993 Free Software Foundation, Inc.
+   Copyright (C) 1993, 94, 95, 98, 1999 Free Software Foundation, Inc.
 
    Written by Fred Fish @ Cygnus Support, using ELF support as the
    template.
@@ -20,7 +20,6 @@ You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
-#include <string.h>            /* For strrchr and friends */
 #include "bfd.h"
 #include "sysdep.h"
 #include "libbfd.h"
@@ -114,12 +113,9 @@ nlm_object_p (abfd)
 
   /* Read in the fixed length portion of the NLM header in external format.  */
 
-  x_fxdhdr = (PTR) malloc ((size_t) nlm_fixed_header_size (abfd));
+  x_fxdhdr = (PTR) bfd_malloc ((size_t) nlm_fixed_header_size (abfd));
   if (x_fxdhdr == NULL)
-    {
-      bfd_set_error (bfd_error_no_memory);
-      goto got_no_match;
-    }
+    goto got_no_match;
 
   if (bfd_read ((PTR) x_fxdhdr, nlm_fixed_header_size (abfd), 1, abfd) !=
       nlm_fixed_header_size (abfd))
@@ -975,7 +971,7 @@ nlm_make_empty_symbol (abfd)
 
 void
 nlm_get_symbol_info (ignore_abfd, symbol, ret)
-     bfd *ignore_abfd;
+     bfd *ignore_abfd ATTRIBUTE_UNUSED;
      asymbol *symbol;
      symbol_info *ret;
 {
@@ -986,7 +982,7 @@ nlm_get_symbol_info (ignore_abfd, symbol, ret)
 
 void
 nlm_print_symbol (abfd, afile, symbol, how)
-     bfd *abfd;
+     bfd *abfd ATTRIBUTE_UNUSED;
      PTR afile;
      asymbol *symbol;
      bfd_print_symbol_type how;
@@ -1686,12 +1682,9 @@ nlm_write_object_contents (abfd)
   unsigned char *fixed_header = NULL;
 
   fixed_header = ((unsigned char *)
-                 malloc ((size_t) nlm_fixed_header_size (abfd)));
+                 bfd_malloc ((size_t) nlm_fixed_header_size (abfd)));
   if (fixed_header == NULL)
-    {
-      bfd_set_error (bfd_error_no_memory);
-      goto error_return;
-    }
+    goto error_return;
 
   if (abfd->output_has_begun == false
       && nlm_compute_section_file_positions (abfd) == false)
This page took 0.023891 seconds and 4 git commands to generate.