From 9fbb53c7c8d54ec90dc308cfb50902b90900b946 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 20 May 2020 22:49:01 +0930 Subject: Replace "if (x) free (x)" with "free (x)", gas * atof-generic.c: Replace "if (x) free (x)" with "free (x)" throughout. * config/obj-elf.c: Likewise. * config/tc-aarch64.c: Likewise. * config/tc-arm.c: Likewise. * config/tc-m68k.c: Likewise. * config/tc-nios2.c: Likewise. * config/tc-tic30.c: Likewise. * ecoff.c: Likewise. * read.c: Likewise. * stabs.c: Likewise. * symbols.c: Likewise. * testsuite/gas/all/test-gen.c: Likewise. --- gas/config/tc-aarch64.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'gas/config/tc-aarch64.c') diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c index da786ba..728fd10 100644 --- a/gas/config/tc-aarch64.c +++ b/gas/config/tc-aarch64.c @@ -8269,8 +8269,7 @@ md_apply_fix (fixS * fixP, valueT * valP, segT seg) /* Free the allocated the struct aarch64_inst. N.B. currently there are very limited number of fix-up types actually use this field, so the impact on the performance should be minimal . */ - if (fixP->tc_fix_data.inst != NULL) - free (fixP->tc_fix_data.inst); + free (fixP->tc_fix_data.inst); return; } @@ -9557,8 +9556,7 @@ aarch64_elf_copy_symbol_attributes (symbolS *dest, symbolS *src) } else { - if (destelf->size != NULL) - free (destelf->size); + free (destelf->size); destelf->size = NULL; } S_SET_SIZE (dest, S_GET_SIZE (src)); -- cgit v1.1