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]

[obv] cleanup: Unify code to "return set_die_type"


Hi,

common dwarf2read.c code uses form:
...
  return set_die_type (die, type, cu);
}

There are three intentional cases of non-terminal:
  set_die_type (die, type, cu);
in
	read_typedef
	read_structure_type
	read_subroutine_type
which make sense but one needs to be careful about those cases.

Just in this case it used the non-terminal form without any reason.


Thanks,
Jan


http://sourceware.org/ml/gdb-cvs/2010-04/msg00020.html

--- src/gdb/ChangeLog	2010/04/02 05:09:28	1.11566
+++ src/gdb/ChangeLog	2010/04/02 15:21:38	1.11567
@@ -1,3 +1,8 @@
+2010-04-02  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* dwarf2read.c (read_namespace_type): Use common "return set_die_type"
+	code form.
+
 2010-04-02  Hui Zhu  <teawater@gmail.com>
 
 	* i386-tdep.c (OT_DQUAD): New enum.
--- src/gdb/dwarf2read.c	2010/03/31 18:13:37	1.377
+++ src/gdb/dwarf2read.c	2010/04/02 15:21:47	1.378
@@ -5637,9 +5637,7 @@
   TYPE_NAME (type) = (char *) name;
   TYPE_TAG_NAME (type) = TYPE_NAME (type);
 
-  set_die_type (die, type, cu);
-
-  return type;
+  return set_die_type (die, type, cu);
 }
 
 /* Read a C++ namespace.  */


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