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.
This commit is contained in:
Alan Modra
2020-05-20 22:50:49 +09:30
parent 3d45296946
commit 5e2ab61254
14 changed files with 56 additions and 84 deletions

View File

@ -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"))