From d3867766af037d2edc43e5eda5689b78828658ac Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Thu, 23 Nov 2023 11:47:29 +0900 Subject: [PATCH] Remove redundant check `is_ld("ld")` returns true --- elf/mold-wrapper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elf/mold-wrapper.c b/elf/mold-wrapper.c index 73fbeda710..8586b69b16 100644 --- a/elf/mold-wrapper.c +++ b/elf/mold-wrapper.c @@ -138,7 +138,7 @@ int posix_spawnp(pid_t *pid, const char *file, const posix_spawnattr_t *attrp, char *const *argv, char *const *envp) { debug_print("posix_spawnp %s\n", file); - if (!strcmp(file, "ld") || is_ld(file)) + if (is_ld(file)) file = get_mold_path(); typeof(posix_spawnp) *real = dlsym(RTLD_NEXT, "posix_spawnp"); return real(pid, file, file_actions, attrp, argv, envp);