From 8833fbf05c5b93fb3ccf666d5a3bd0e51e75d1bd Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 2 Jan 2019 09:30:49 -0700 Subject: 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 * 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. --- gdb/python/py-breakpoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/python/py-breakpoint.c') diff --git a/gdb/python/py-breakpoint.c b/gdb/python/py-breakpoint.c index 1d0c3d2..f41d88d 100644 --- a/gdb/python/py-breakpoint.c +++ b/gdb/python/py-breakpoint.c @@ -1196,7 +1196,7 @@ local_setattro (PyObject *self, PyObject *name, PyObject *v) } } - return PyObject_GenericSetAttr ((PyObject *)self, name, v); + return PyObject_GenericSetAttr (self, name, v); } static gdb_PyGetSetDef breakpoint_object_getset[] = { -- cgit v1.1