aboutsummaryrefslogtreecommitdiff
path: root/gprofng/src/checks.cc
diff options
context:
space:
mode:
authorVladimir Mezentsev <vladimir.mezentsev@oracle.com>2023-08-09 19:18:58 -0700
committerVladimir Mezentsev <vladimir.mezentsev@oracle.com>2023-08-12 19:46:52 -0700
commite15197c8040b9e985a6164f13947dae881d792d8 (patch)
tree72a01a2c93e7df72c3cbd661d55c936a6c190b74 /gprofng/src/checks.cc
parente5776db07a2c797a7ce7ae4d50395a264f0ae8e6 (diff)
downloadgdb-e15197c8040b9e985a6164f13947dae881d792d8.zip
gdb-e15197c8040b9e985a6164f13947dae881d792d8.tar.gz
gdb-e15197c8040b9e985a6164f13947dae881d792d8.tar.bz2
gprofng: fix typos in get_realpath() and check_executable()
gprofng/ChangeLog 2023-08-09 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> * src/Application.cc (Application::get_realpath): Fix typo. * src/checks.cc (collect::check_executable): Likewise.
Diffstat (limited to 'gprofng/src/checks.cc')
-rw-r--r--gprofng/src/checks.cc9
1 files changed, 2 insertions, 7 deletions
diff --git a/gprofng/src/checks.cc b/gprofng/src/checks.cc
index 4524611..094c3bb 100644
--- a/gprofng/src/checks.cc
+++ b/gprofng/src/checks.cc
@@ -261,7 +261,7 @@ collect::check_executable (char *target_name)
{
// not found, look on path
char *exe_name = get_realpath (target_name);
- if (access (exe_name, X_OK) == 0)
+ if (access (exe_name, X_OK) != 0)
{
// target can't be located
// one last attempt: append .class to name, and see if we can find it
@@ -293,13 +293,8 @@ collect::check_executable (char *target_name)
return EXEC_OK;
// do not by pass checking architectural match
collect::Exec_status exec_stat = check_executable_arch (elf);
- if (exec_stat != EXEC_OK)
- {
- delete elf;
- return exec_stat;
- }
delete elf;
- return EXEC_OK;
+ return exec_stat;
}
collect::Exec_status