gdb: add target_ops::supports_displaced_step
[deliverable/binutils-gdb.git] / bfd / coff-alpha.c
index 821e5591a9a9562746abf654dafb40dfada6e477..cb52668734460399ae9436e36a89cb8dbbfb3112 100644 (file)
@@ -398,10 +398,10 @@ static reloc_howto_type alpha_howto_table[] =
 \f
 /* Recognize an Alpha ECOFF file.  */
 
-static const bfd_target *
+static bfd_cleanup
 alpha_ecoff_object_p (bfd *abfd)
 {
-  static const bfd_target *ret;
+  bfd_cleanup ret;
 
   ret = coff_object_p (abfd);
 
@@ -1127,13 +1127,11 @@ alpha_ecoff_get_relocated_section_contents (bfd *abfd,
     abort ();
 
  successful_return:
-  if (reloc_vector != NULL)
-    free (reloc_vector);
+  free (reloc_vector);
   return data;
 
  error_return:
-  if (reloc_vector != NULL)
-    free (reloc_vector);
+  free (reloc_vector);
   return NULL;
 }
 
@@ -2130,7 +2128,7 @@ alpha_ecoff_get_elt_at_filepos (bfd *archive, file_ptr filepos)
                n = dict[h];
              else
                {
-                 if (! bfd_bread (&n, (bfd_size_type) 1, nbfd))
+                 if (bfd_bread (&n, 1, nbfd) != 1)
                    goto error_return;
                  dict[h] = n;
                }
@@ -2171,8 +2169,7 @@ alpha_ecoff_get_elt_at_filepos (bfd *archive, file_ptr filepos)
   return nbfd;
 
  error_return:
-  if (buf != NULL)
-    free (buf);
+  free (buf);
   if (nbfd != NULL)
     bfd_close (nbfd);
   return NULL;
This page took 0.030406 seconds and 4 git commands to generate.