aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-arch.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-01-02 09:30:49 -0700
committerTom Tromey <tom@tromey.com>2019-01-02 09:32:06 -0700
commit8833fbf05c5b93fb3ccf666d5a3bd0e51e75d1bd (patch)
tree5799abeec2743c0c13cc9f8f3cb3e11492162c83 /gdb/python/py-arch.c
parent4ada3dfd5c07f0f1045a721a28fc905918ffbdfd (diff)
downloadgdb-8833fbf05c5b93fb3ccf666d5a3bd0e51e75d1bd.zip
gdb-8833fbf05c5b93fb3ccf666d5a3bd0e51e75d1bd.tar.gz
gdb-8833fbf05c5b93fb3ccf666d5a3bd0e51e75d1bd.tar.bz2
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.
Diffstat (limited to 'gdb/python/py-arch.c')
-rw-r--r--gdb/python/py-arch.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/gdb/python/py-arch.c b/gdb/python/py-arch.c
index 64f6563..cbdd881 100644
--- a/gdb/python/py-arch.c
+++ b/gdb/python/py-arch.c
@@ -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