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: push_target: Remove unused retval


Hi,

the return value of push_target was not used anywhere.

Checked-in.


Thanks,
Jan


http://sourceware.org/ml/gdb-cvs/2010-05/msg00198.html

--- src/gdb/ChangeLog	2010/05/23 00:56:58	1.11834
+++ src/gdb/ChangeLog	2010/05/23 14:23:30	1.11835
@@ -1,3 +1,10 @@
+2010-05-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	Code cleanup.
+	* target.c (push_target): Return only void.  Remove the return value
+	comment.
+	* target.h (push_target): Return only void.
+
 2010-05-23  Pedro Alves  <pedro@codesourcery.com>
 
 	Update gnulib from latest git.
--- src/gdb/target.c	2010/05/17 10:40:06	1.254
+++ src/gdb/target.c	2010/05/23 14:23:31	1.255
@@ -872,14 +872,11 @@
 /* Push a new target type into the stack of the existing target accessors,
    possibly superseding some of the existing accessors.
 
-   Result is zero if the pushed target ended up on top of the stack,
-   nonzero if at least one target is on top of it.
-
    Rather than allow an empty stack, we always have the dummy target at
    the bottom stratum, so we can call the function vectors without
    checking them.  */
 
-int
+void
 push_target (struct target_ops *t)
 {
   struct target_ops **cur;
@@ -920,9 +917,6 @@
   (*cur) = t;
 
   update_current_target ();
-
-  /* Not on top?  */
-  return (t != target_stack);
 }
 
 /* Remove a target_ops vector from the stack, wherever it may be.
--- src/gdb/target.h	2010/05/17 10:40:06	1.181
+++ src/gdb/target.h	2010/05/23 14:23:31	1.182
@@ -1414,7 +1414,7 @@
 
 extern void add_target (struct target_ops *);
 
-extern int push_target (struct target_ops *);
+extern void push_target (struct target_ops *);
 
 extern int unpush_target (struct target_ops *);
 


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