This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Obv: Remove useless variables (gdbpy_inferiors)


a small patch to remove variables not used in gdbpy_inferiors,
certainly a refactoring after `iterate_over_inferiors' integration


Cordially,

Kevin

----
2011-04-21  Kevin Pouget  <kevin.pouget@st.com>

        * python/py-inferior.c (gdbpy_inferiors): Remove useless variables.


---
 gdb/python/py-inferior.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/gdb/python/py-inferior.c b/gdb/python/py-inferior.c
index b9df394..9a2621d 100644
--- a/gdb/python/py-inferior.c
+++ b/gdb/python/py-inferior.c
@@ -334,12 +334,11 @@ build_inferior_list (struct inferior *inf, void *arg)

 /* Implementation of gdb.inferiors () -> (gdb.Inferior, ...).
    Returns a tuple of all inferiors.  */
+
 PyObject *
 gdbpy_inferiors (PyObject *unused, PyObject *unused2)
 {
-  int i = 0;
-  PyObject *list, *inferior;
-  struct inferior *inf;
+  PyObject *list;

   list = PyList_New (0);
   if (!list)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]