From 5e2ab6125485bede5611187f2df4b26b04026b80 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 20 May 2020 22:50:49 +0930 Subject: 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. --- ld/emultempl/pe.em | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'ld/emultempl/pe.em') diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em index 8c5ee76..3899c9d 100644 --- a/ld/emultempl/pe.em +++ b/ld/emultempl/pe.em @@ -884,11 +884,8 @@ gld${EMULATION_NAME}_handle_option (int optc) pe_dll_characteristics |= IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE; break; case OPTION_BUILD_ID: - if (emit_build_id != NULL) - { - free ((char *) emit_build_id); - emit_build_id = NULL; - } + free ((char *) emit_build_id); + emit_build_id = NULL; if (optarg == NULL) optarg = DEFAULT_BUILD_ID_STYLE; if (strcmp (optarg, "none")) -- cgit v1.1