diff options
author | Alan Modra <amodra@gmail.com> | 2020-05-20 17:25:20 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-05-21 10:11:57 +0930 |
commit | c95949892f6f1e2974a0fb8a5463d7b6432ac469 (patch) | |
tree | 787ac00de8dc1bfb5170e2b2caf05e66d8ab6c7f /bfd/elf32-arm.c | |
parent | c31ab5a0010ac9e3d31fd218fffcff1b9696363e (diff) | |
download | gdb-c95949892f6f1e2974a0fb8a5463d7b6432ac469.zip gdb-c95949892f6f1e2974a0fb8a5463d7b6432ac469.tar.gz gdb-c95949892f6f1e2974a0fb8a5463d7b6432ac469.tar.bz2 |
Replace "if (x) free (x)" with "free (x)", bfd
* aoutx.h: Replace "if (x) free (x)" with "free (x)" throughout.
* archive.c, * bfd.c, * bfdio.c, * coff-alpha.c, * coff-ppc.c,
* coff-sh.c, * coff-stgo32.c, * coffcode.h, * coffgen.c,
* cofflink.c, * cpu-arm.c, * doc/chew.c, * dwarf2.c, * ecoff.c,
* ecofflink.c, * elf-eh-frame.c, * elf-m10200.c, * elf-m10300.c,
* elf-strtab.c, * elf.c, * elf32-arc.c, * elf32-arm.c,
* elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c, * elf32-crx.c,
* elf32-epiphany.c, * elf32-ft32.c, * elf32-h8300.c,
* elf32-ip2k.c, * elf32-m32c.c, * elf32-m68hc11.c,
* elf32-m68k.c, * elf32-microblaze.c, * elf32-msp430.c,
* elf32-nds32.c, * elf32-nios2.c, * elf32-ppc.c, * elf32-pru.c,
* elf32-rl78.c, * elf32-rx.c, * elf32-sh.c, * elf32-spu.c,
* elf32-v850.c, * elf32-xtensa.c, * elf64-alpha.c,
* elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c
* elf64-mmix.c, * elf64-ppc.c, * elf64-sparc.c, * elfcode.h,
* elflink.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c,
* elfxx-x86.c, * format.c, * ihex.c, * libbfd.c, * linker.c,
* mmo.c, * opncls.c, * pdp11.c, * peXXigen.c, * pef.c,
* peicode.h, * simple.c, * som.c, * srec.c, * stabs.c, * syms.c,
* targets.c, * vms-lib.c, * xcofflink.c, * xtensa-isa.c: Likewise.
Diffstat (limited to 'bfd/elf32-arm.c')
-rw-r--r-- | bfd/elf32-arm.c | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index 02d43a8..927a527 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -6617,9 +6617,7 @@ elf32_arm_size_stubs (bfd *output_bfd, free (internal_relocs); /* Fall through. */ error_ret_free_local: - if (local_syms != NULL - && (symtab_hdr->contents - != (unsigned char *) local_syms)) + if (symtab_hdr->contents != (unsigned char *) local_syms) free (local_syms); return FALSE; } @@ -7986,13 +7984,11 @@ bfd_elf32_arm_process_before_allocation (bfd *abfd, } } - if (contents != NULL - && elf_section_data (sec)->this_hdr.contents != contents) + if (elf_section_data (sec)->this_hdr.contents != contents) free (contents); contents = NULL; - if (internal_relocs != NULL - && elf_section_data (sec)->relocs != internal_relocs) + if (elf_section_data (sec)->relocs != internal_relocs) free (internal_relocs); internal_relocs = NULL; } @@ -8000,11 +7996,9 @@ bfd_elf32_arm_process_before_allocation (bfd *abfd, return TRUE; error_return: - if (contents != NULL - && elf_section_data (sec)->this_hdr.contents != contents) + if (elf_section_data (sec)->this_hdr.contents != contents) free (contents); - if (internal_relocs != NULL - && elf_section_data (sec)->relocs != internal_relocs) + if (elf_section_data (sec)->relocs != internal_relocs) free (internal_relocs); return FALSE; @@ -8607,8 +8601,7 @@ bfd_elf32_arm_vfp11_erratum_scan (bfd *abfd, struct bfd_link_info *link_info) } } - if (contents != NULL - && elf_section_data (sec)->this_hdr.contents != contents) + if (elf_section_data (sec)->this_hdr.contents != contents) free (contents); contents = NULL; } @@ -8616,8 +8609,7 @@ bfd_elf32_arm_vfp11_erratum_scan (bfd *abfd, struct bfd_link_info *link_info) return TRUE; error_return: - if (contents != NULL - && elf_section_data (sec)->this_hdr.contents != contents) + if (elf_section_data (sec)->this_hdr.contents != contents) free (contents); return FALSE; @@ -9044,8 +9036,7 @@ bfd_elf32_arm_stm32l4xx_erratum_scan (bfd *abfd, } } - if (contents != NULL - && elf_section_data (sec)->this_hdr.contents != contents) + if (elf_section_data (sec)->this_hdr.contents != contents) free (contents); contents = NULL; } @@ -9053,8 +9044,7 @@ bfd_elf32_arm_stm32l4xx_erratum_scan (bfd *abfd, return TRUE; error_return: - if (contents != NULL - && elf_section_data (sec)->this_hdr.contents != contents) + if (elf_section_data (sec)->this_hdr.contents != contents) free (contents); return FALSE; |