[pushed] Remove return value from remove_breakpoints_inf

Message ID 20190703020927.28406-1-simon.marchi@polymtl.ca
State New
Headers show
Series
  • [pushed] Remove return value from remove_breakpoints_inf
Related show

Commit Message

Simon Marchi July 3, 2019, 2:09 a.m.
... since nobody uses it.

gdb/ChangeLog:

	* breakpoint.h (remove_breakpoints_inf): Change return type to
	void, move function documentation here.
	* breakpoint.c (remove_breakpoints_inf): Change return type to
	void, move function documentation to header.
---
 gdb/ChangeLog    | 7 +++++++
 gdb/breakpoint.c | 7 +++----
 gdb/breakpoint.h | 4 +++-
 3 files changed, 13 insertions(+), 5 deletions(-)

-- 
2.22.0

Patch

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 35f1baefb997..d50fe89f1150 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@ 
+2019-07-02  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* breakpoint.h (remove_breakpoints_inf): Change return type to
+	void, move function documentation here.
+	* breakpoint.c (remove_breakpoints_inf): Change return type to
+	void, move function documentation to header.
+
 2019-07-02  Pedro Alves  <palves@redhat.com>
 
 	* NEWS (Completion improvements): Mention "info threads".
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 8422db8b571f..b49be762a2fe 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -3049,9 +3049,9 @@  Thread-specific breakpoint %d deleted - thread %s no longer in the thread list.\
     }
 }
 
-/* Remove breakpoints of inferior INF.  */
+/* See breakpoint.h.  */
 
-int
+void
 remove_breakpoints_inf (inferior *inf)
 {
   struct bp_location *bl, **blp_tmp;
@@ -3066,10 +3066,9 @@  remove_breakpoints_inf (inferior *inf)
       {
 	val = remove_breakpoint (bl);
 	if (val != 0)
-	  return val;
+	  return;
       }
   }
-  return 0;
 }
 
 static int internal_breakpoint_number = -1;
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
index 906803132822..75f19785cb1d 100644
--- a/gdb/breakpoint.h
+++ b/gdb/breakpoint.h
@@ -1390,7 +1390,9 @@  extern void insert_breakpoints (void);
 
 extern int remove_breakpoints (void);
 
-extern int remove_breakpoints_inf (inferior *inf);
+/* Remove breakpoints of inferior INF.  */
+
+extern void remove_breakpoints_inf (inferior *inf);
 
 /* This function can be used to update the breakpoint package's state
    after an exec() system call has been executed.