Style improvements in gdb/python

This fixes a few minor style issues I found in gdb/python: some
unnecessary casts, the removal of an unnecessary local variable, and
one instance of incorrect formatting.

Tested by rebuilding and re-running gdb.python.

gdb/ChangeLog
2019-01-02  Tom Tromey  <tom@tromey.com>

	* python/py-inferior.c (gdbpy_initialize_inferior): Fix
	indentation.
	* python/py-frame.c (frapy_older): Remove cast.
	(frapy_newer): Likewise.
	* python/py-breakpoint.c (local_setattro): Remove cast.
	* python/py-arch.c (archpy_name): Remove local variable.
	* python/py-type.c (gdbpy_lookup_type): Remove cast.
This commit is contained in:
Tom Tromey 2019-01-02 09:30:49 -07:00
parent 4ada3dfd5c
commit 8833fbf05c
6 changed files with 17 additions and 10 deletions

View file

@ -97,14 +97,11 @@ archpy_name (PyObject *self, PyObject *args)
{
struct gdbarch *gdbarch = NULL;
const char *name;
PyObject *py_name;
ARCHPY_REQUIRE_VALID (self, gdbarch);
name = (gdbarch_bfd_arch_info (gdbarch))->printable_name;
py_name = PyString_FromString (name);
return py_name;
return PyString_FromString (name);
}
/* Implementation of