diff options
author | Alan Modra <amodra@gmail.com> | 2020-05-20 22:50:49 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-05-21 10:45:33 +0930 |
commit | 5e2ab6125485bede5611187f2df4b26b04026b80 (patch) | |
tree | f3884cb27e8761b535ee38e63ebee33c5cdbfea4 /ld/ldfile.c | |
parent | 3d45296946ba5c0ff59c407029bee3f368cace00 (diff) | |
download | gdb-5e2ab6125485bede5611187f2df4b26b04026b80.zip gdb-5e2ab6125485bede5611187f2df4b26b04026b80.tar.gz gdb-5e2ab6125485bede5611187f2df4b26b04026b80.tar.bz2 |
Replace "if (x) free (x)" with "free (x)", ld
* deffilep.y: Replace "if (x) free (x)" with "free (x)" thoughout.
* emultempl/elf.em: Likewise.
* emultempl/msp430.em: Likewise.
* emultempl/pe.em: Likewise.
* emultempl/pep.em: Likewise.
* emultempl/ppc64elf.em: Likewise.
* emultempl/xtensaelf.em: Likewise.
* ldelf.c: Likewise.
* ldfile.c: Likewise.
* ldmain.c: Likewise.
* ldmisc.c: Likewise.
* lexsup.c: Likewise.
* pe-dll.c: Likewise.
Diffstat (limited to 'ld/ldfile.c')
-rw-r--r-- | ld/ldfile.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ld/ldfile.c b/ld/ldfile.c index 53112c8..60b28d3 100644 --- a/ld/ldfile.c +++ b/ld/ldfile.c @@ -240,8 +240,8 @@ ldfile_try_open_bfd (const char *attempt, skip = 1; } free (arg1); - if (arg2) free (arg2); - if (arg3) free (arg3); + free (arg2); + free (arg3); break; case NAME: case LNAME: @@ -250,8 +250,7 @@ ldfile_try_open_bfd (const char *attempt, free (yylval.name); break; case INT: - if (yylval.bigint.str) - free (yylval.bigint.str); + free (yylval.bigint.str); break; } token = yylex (); |