[PATCH] Obv: Remove useless variables (gdbpy_inferiors)

Kevin Pouget kevin.pouget@gmail.com
Thu Apr 21 14:47:00 GMT 2011


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)



More information about the Gdb mailing list