This is the mail archive of the gdb-patches@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]

[commit] Fix small style violation in py-value.c:get_field_type


Hello,

Another small coding style violation I happened to notice, so fixed
thusly.

gdb/ChangeLog:

        * python/py-value.c (get_field_type): Remove unnecessary curly
        braces for single-statement if block.

Tested on x86_64-linux.
Pushed.

---
 gdb/ChangeLog         | 5 +++++
 gdb/python/py-value.c | 8 +++-----
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 5702257..e752dd0 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
 2014-01-15  Joel Brobecker  <brobecker@adacore.com>
 
+	* python/py-value.c (get_field_type): Remove unnecessary curly
+	braces for single-statement if block.
+
+2014-01-15  Joel Brobecker  <brobecker@adacore.com>
+
 	* python/py-type.c (convert_field): Add missing empty line
 	after declarations.
 
diff --git a/gdb/python/py-value.c b/gdb/python/py-value.c
index 65750a4..67e6c4e 100644
--- a/gdb/python/py-value.c
+++ b/gdb/python/py-value.c
@@ -577,11 +577,9 @@ get_field_type (PyObject *field)
   ftype = type_object_to_type (ftype_obj);
   Py_DECREF (ftype_obj);
   if (ftype == NULL)
-    {
-      PyErr_SetString (PyExc_TypeError,
-		       _("'type' attribute of gdb.Field object is not a "
-			 "gdb.Type object."));
-    }
+    PyErr_SetString (PyExc_TypeError,
+		     _("'type' attribute of gdb.Field object is not a "
+		       "gdb.Type object."));
 
   return ftype;
 }
-- 
1.8.3.2


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