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]

[PATCH 44/61] Change tui_get_register to return void


tui_get_register returns a tui_status, but nothing checks this, so it
can return void instead.

2019-07-04  Tom Tromey  <tom@tromey.com>

	* tui/tui-regs.c (tui_get_register): Return void.
---
 gdb/ChangeLog      |  4 ++++
 gdb/tui/tui-regs.c | 13 ++++---------
 2 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c
index 8ba517a6ac0..c6ed19d4295 100644
--- a/gdb/tui/tui-regs.c
+++ b/gdb/tui/tui-regs.c
@@ -54,9 +54,9 @@ static void tui_show_register_group (tui_data_window *win_info,
 				     struct frame_info *frame,
 				     int refresh_values_only);
 
-static enum tui_status tui_get_register (struct frame_info *frame,
-					 struct tui_data_item_window *data,
-					 int regnum, bool *changedp);
+static void tui_get_register (struct frame_info *frame,
+			      struct tui_data_item_window *data,
+			      int regnum, bool *changedp);
 
 
 
@@ -654,13 +654,11 @@ tui_register_format (struct frame_info *frame, int regnum)
 /* Get the register value from the given frame and format it for the
    display.  When changep is set, check if the new register value has
    changed with respect to the previous call.  */
-static enum tui_status
+static void
 tui_get_register (struct frame_info *frame,
                   struct tui_data_item_window *data, 
 		  int regnum, bool *changedp)
 {
-  enum tui_status ret = TUI_FAILURE;
-
   if (changedp)
     *changedp = false;
   if (target_has_registers)
@@ -674,8 +672,5 @@ tui_get_register (struct frame_info *frame,
 	*changedp = true;
 
       xfree (prev_content);
-
-      ret = TUI_SUCCESS;
     }
-  return ret;
 }
-- 
2.17.2


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