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]

FYI: minor vec tweak in solib-target.c


I am checking this in.

While working on something else I noticed that solib-target.c uses
DEF_VEC_O(CORE_ADDR).  Since CORE_ADDR is a scalar, I think it is better
to use DEF_VEC_I.

Tom

2011-07-29  Tom Tromey  <tromey@redhat.com>

	* solib-target.c: Use DEF_VEC_I, not DEF_VEC_O.
	(library_list_start_segment): Update.
	(library_list_start_section): Update.

Index: solib-target.c
===================================================================
RCS file: /cvs/src/src/gdb/solib-target.c,v
retrieving revision 1.20
diff -u -r1.20 solib-target.c
--- solib-target.c	2 Feb 2011 16:12:59 -0000	1.20
+++ solib-target.c	29 Jul 2011 17:36:07 -0000
@@ -28,7 +28,7 @@
 
 #include "gdb_string.h"
 
-DEF_VEC_O(CORE_ADDR);
+DEF_VEC_I(CORE_ADDR);
 
 /* Private data for each loaded library.  */
 struct lm_info
@@ -93,7 +93,7 @@
     gdb_xml_error (parser,
 		   _("Library list with both segments and sections"));
 
-  VEC_safe_push (CORE_ADDR, last->segment_bases, &address);
+  VEC_safe_push (CORE_ADDR, last->segment_bases, address);
 }
 
 static void
@@ -110,7 +110,7 @@
     gdb_xml_error (parser,
 		   _("Library list with both segments and sections"));
 
-  VEC_safe_push (CORE_ADDR, last->section_bases, &address);
+  VEC_safe_push (CORE_ADDR, last->section_bases, address);
 }
 
 /* Handle the start of a <library> element.  */


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