aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2024-05-30 14:53:55 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2024-06-07 23:09:03 -0400
commit449637674f3146537e8f58520ce1058b9dd58c0a (patch)
tree496f50af0a6680a22e49737b870afc81e54ce6dd
parent0a70e1a8a94b29d9fe461d0a401f7c2d02f8c441 (diff)
downloadgdb-449637674f3146537e8f58520ce1058b9dd58c0a.zip
gdb-449637674f3146537e8f58520ce1058b9dd58c0a.tar.gz
gdb-449637674f3146537e8f58520ce1058b9dd58c0a.tar.bz2
gdb: remove dead code in nto-procfs.c
`get_exec_file()` never returns nullptr, so remove some dead code that check for a nullptr return. Change-Id: I9eff2a013d602588aaf4477a22cf45f2bc417c6a Approved-By: Tom Tromey <tom@tromey.com>
-rw-r--r--gdb/nto-procfs.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/gdb/nto-procfs.c b/gdb/nto-procfs.c
index c3a4579..9ec2147 100644
--- a/gdb/nto-procfs.c
+++ b/gdb/nto-procfs.c
@@ -1191,14 +1191,6 @@ nto_procfs_target::create_inferior (const char *exec_file,
argv = xmalloc ((allargs.size () / (unsigned) 2 + 2) *
sizeof (*argv));
argv[0] = const_cast<char *> (get_exec_file ());
- if (!argv[0])
- {
- if (exec_file)
- argv[0] = exec_file;
- else
- return;
- }
-
args = xstrdup (allargs.c_str ());
breakup_args (args, (exec_file != NULL) ? &argv[1] : &argv[0]);