Change tui_get_register to return void
authorTom Tromey <tom@tromey.com>
Mon, 1 Jul 2019 06:51:20 +0000 (00:51 -0600)
committerTom Tromey <tom@tromey.com>
Wed, 17 Jul 2019 18:19:17 +0000 (12:19 -0600)
tui_get_register returns a tui_status, but nothing checks this, so it
can return void instead.

gdb/ChangeLog
2019-07-17  Tom Tromey  <tom@tromey.com>

* tui/tui-regs.c (tui_get_register): Return void.

gdb/ChangeLog
gdb/tui/tui-regs.c

index 0de9c33e362ea446cccc23c800319f501e2c9f9b..8de1558eea24862b8a507a6405a5d49e1358caf2 100644 (file)
@@ -1,3 +1,7 @@
+2019-07-17  Tom Tromey  <tom@tromey.com>
+
+       * tui/tui-regs.c (tui_get_register): Return void.
+
 2019-07-17  Tom Tromey  <tom@tromey.com>
 
        * tui/tui-wingeneral.c (tui_gen_win_info::make_visible):
index 382a44126d37fda2f45c15c42627777bd78dea63..52f67026b549043e76f1b346f111729c53461795 100644 (file)
@@ -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);
 
 
 
@@ -646,13 +646,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)
@@ -666,8 +664,5 @@ tui_get_register (struct frame_info *frame,
        *changedp = true;
 
       xfree (prev_content);
-
-      ret = TUI_SUCCESS;
     }
-  return ret;
 }
This page took 0.030519 seconds and 4 git commands to generate.