*** empty log message ***
[deliverable/binutils-gdb.git] / bfd / bfd.c
index 78bac79b760b975e7961d10780b6b146cd9c75e1..291850b8482f4dfd5d171da324c34d74012956cc 100644 (file)
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -310,7 +310,7 @@ bfd_set_format (abfd, format)
      bfd *abfd;
      bfd_format format;
 {
-  file_ptr filepos;
+
 
   if (bfd_read_p (abfd) ||
       ((int)abfd->format < (int)bfd_unknown) ||
@@ -324,11 +324,11 @@ bfd_set_format (abfd, format)
   /* presume the answer is yes */
   abfd->format = format;
 
-  filepos = bfd_tell (abfd);
+/*  filepos = bfd_tell (abfd);*/
 
   if (!BFD_SEND_FMT (abfd, _bfd_set_format, (abfd))) {
     abfd->format = bfd_unknown;
-    bfd_seek (abfd, filepos, SEEK_SET);
+/*    bfd_seek (abfd, filepos, SEEK_SET);*/
     return false;
   }
 
@@ -371,7 +371,7 @@ DEFUN(bfd_make_section,(abfd, name),
     sect = sect->next;
   }
 
-  newsect = (asection *) zalloc (sizeof (asection));
+  newsect = (asection *) bfd_zalloc(abfd, sizeof (asection));
   if (newsect == NULL) {
     bfd_error = no_memory;
     return NULL;
@@ -381,13 +381,13 @@ DEFUN(bfd_make_section,(abfd, name),
   newsect->index = abfd->section_count++;
   newsect->flags = SEC_NO_FLAGS;
 
-#if ignore     /* the compiler doesn't know that zalloc clears the storage */
+
   newsect->userdata = 0;
   newsect->next = (asection *)NULL;
   newsect->relocation = (arelent *)NULL;
   newsect->reloc_count = 0;
   newsect->line_filepos =0;
-#endif
+
   if (BFD_SEND (abfd, _new_section_hook, (abfd, newsect)) != true) {
     free (newsect);
     return NULL;
This page took 0.02527 seconds and 4 git commands to generate.