]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: remove dead code in nto-procfs.c
authorSimon Marchi <simon.marchi@polymtl.ca>
Thu, 30 May 2024 18:53:55 +0000 (14:53 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Sat, 8 Jun 2024 03:09:03 +0000 (23:09 -0400)
`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>
gdb/nto-procfs.c

index c3a45796dcc7810ad4aed4704c1819775770af8a..9ec21477127185f5233da4427d8f1bec4b28ea0e 100644 (file)
@@ -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]);