This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] Remove unnecessary inferior lookup in inferior_command
- From: Simon Marchi <simon dot marchi at ericsson dot com>
- To: <gdb-patches at sourceware dot org>
- Cc: Simon Marchi <simon dot marchi at ericsson dot com>
- Date: Mon, 5 Dec 2016 17:32:16 -0500
- Subject: [PATCH] Remove unnecessary inferior lookup in inferior_command
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=simon dot marchi at ericsson dot com;
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
In the case where we switch to a non-running inferior, we do a
"find_inferior_id (num)", although we did the same call right before. We can
safely remove it.
gdb/ChangeLog:
* inferior.c (inferior_command): Remove duplicate
find_inferior_id call.
---
gdb/inferior.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/gdb/inferior.c b/gdb/inferior.c
index 0abd2c058e..9fcdbd3b83 100644
--- a/gdb/inferior.c
+++ b/gdb/inferior.c
@@ -763,9 +763,6 @@ inferior_command (char *args, int from_tty)
}
else
{
- struct inferior *inf;
-
- inf = find_inferior_id (num);
set_current_inferior (inf);
switch_to_thread (null_ptid);
set_current_program_space (inf->pspace);
--
2.11.0