[44/61] Change tui_get_register to return void

Message ID 20190704170311.15982-45-tom@tromey.com
State New
Headers show
Series
  • More TUI refactorings
Related show

Commit Message

Tom Tromey July 4, 2019, 5:02 p.m.
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(-)

-- 
2.17.2

Patch

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;
 }