[binutils-gdb] gdb: remove unnecessary braces in recursive_dump_type
Tankut Baris Aktemur via Gdb-cvs <[email protected]> Thu, 23 Jul 2026 10:13:50 +0000 (GMT)
| Newsgroups | gmane.comp.gdb.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D078e4676be5d= 047ccaf7ec316cbb0c6cbd17e00d commit 078e4676be5d047ccaf7ec316cbb0c6cbd17e00d Author: Tankut Baris Aktemur <[email protected]> Date: Thu Jul 23 05:04:43 2026 -0500 gdb: remove unnecessary braces in recursive_dump_type =20 Following the refactoring patches, remove unnecessary branches in recursive_dump_type to comply with the GNU code style. =20 Approved-By: Tom Tromey <[email protected]> Diff: --- gdb/gdbtypes.c | 46 +++++++++++++--------------------------------- 1 file changed, 13 insertions(+), 33 deletions(-) diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index f9764fb1da3..9098727959e 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -5011,9 +5011,8 @@ recursive_dump_type (struct type *type, int spaces) gdb_printf ("%*starget_type %s\n", spaces, "", host_address_to_string (type->target_type ())); if (type->target_type () !=3D NULL) - { - recursive_dump_type (type->target_type (), spaces + 2); - } + recursive_dump_type (type->target_type (), spaces + 2); + gdb_printf ("%*spointer_type %s\n", spaces, "", host_address_to_string (type->pointer_type)); gdb_printf ("%*sreference_type %s\n", spaces, "", @@ -5039,44 +5038,27 @@ recursive_dump_type (struct type *type, int spaces) =20 gdb_printf ("%*sflags", spaces, ""); if (type->is_unsigned ()) - { - gdb_puts (" TYPE_UNSIGNED"); - } + gdb_puts (" TYPE_UNSIGNED"); if (type->has_no_signedness ()) - { - gdb_puts (" TYPE_NOSIGN"); - } + gdb_puts (" TYPE_NOSIGN"); if (type->endianity_is_not_default ()) - { - gdb_puts (" TYPE_ENDIANITY_NOT_DEFAULT"); - } + gdb_puts (" TYPE_ENDIANITY_NOT_DEFAULT"); if (type->is_stub ()) - { - gdb_puts (" TYPE_STUB"); - } + gdb_puts (" TYPE_STUB"); if (type->target_is_stub ()) - { - gdb_puts (" TYPE_TARGET_STUB"); - } + gdb_puts (" TYPE_TARGET_STUB"); if (type->is_prototyped ()) - { - gdb_puts (" TYPE_PROTOTYPED"); - } + gdb_puts (" TYPE_PROTOTYPED"); if (type->has_varargs ()) - { - gdb_puts (" TYPE_VARARGS"); - } + gdb_puts (" TYPE_VARARGS"); + /* This is used for things like AltiVec registers on ppc. Gcc emits an attribute for the array type, which tells whether or not we have a vector, instead of a regular array. */ if (type->is_vector ()) - { - gdb_puts (" TYPE_VECTOR"); - } + gdb_puts (" TYPE_VECTOR"); if (type->is_fixed_instance ()) - { - gdb_puts (" TYPE_FIXED_INSTANCE"); - } + gdb_puts (" TYPE_FIXED_INSTANCE"); if (type->is_nottext ()) gdb_puts (" TYPE_NOTTEXT"); gdb_puts ("\n"); @@ -5128,9 +5110,7 @@ recursive_dump_type (struct type *type, int spaces) =20 gdb_printf ("\n"); if (fld.type () !=3D NULL) - { - recursive_dump_type (fld.type (), spaces + 4); - } + recursive_dump_type (fld.type (), spaces + 4); } if (type->code () =3D=3D TYPE_CODE_RANGE) {