X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=bfd%2Fcoff-alpha.c;h=cb52668734460399ae9436e36a89cb8dbbfb3112;hb=refs%2Fheads%2Fconcurrent-displaced-stepping-2020-04-01;hp=821e5591a9a9562746abf654dafb40dfada6e477;hpb=a4dd6c97bd5c7e2cc58f4d2a0b83145646f67cc7;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/coff-alpha.c b/bfd/coff-alpha.c index 821e5591a9..cb52668734 100644 --- a/bfd/coff-alpha.c +++ b/bfd/coff-alpha.c @@ -398,10 +398,10 @@ static reloc_howto_type alpha_howto_table[] = /* 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;