Remove NULL check from tui_reg_command
[deliverable/binutils-gdb.git] / gdb / tui / tui-regs.c
index 89faefa8f60fcd45f34b06ebbcbaf713f7d80163..b3c7ce627b46de0d7a8c16026ac0e4ef9c7fadbf 100644 (file)
@@ -138,7 +138,7 @@ tui_show_registers (struct reggroup *group)
 
   /* Make sure the register window is visible.  If not, select an
      appropriate layout.  */
-  if (TUI_DATA_WIN == NULL || !TUI_DATA_WIN->is_visible)
+  if (TUI_DATA_WIN == NULL || !TUI_DATA_WIN->is_visible ())
     tui_reg_layout ();
 
   if (group == 0)
@@ -165,7 +165,7 @@ tui_show_registers (struct reggroup *group)
   else
     {
       TUI_DATA_WIN->current_group = 0;
-      TUI_DATA_WIN->erase_data_content (NO_REGS_STRING);
+      TUI_DATA_WIN->erase_data_content (_("[ Register Values Unavailable ]"));
     }
 }
 
@@ -411,7 +411,7 @@ tui_data_window::first_data_item_displayed ()
       struct tui_gen_win_info *data_item_win;
 
       data_item_win = regs_content[i].get ();
-      if (data_item_win->handle != NULL && data_item_win->is_visible)
+      if (data_item_win->is_visible ())
        return i;
     }
 
@@ -427,7 +427,6 @@ tui_data_window::delete_data_content_windows ()
     {
       tui_delete_win (win->handle);
       win->handle = NULL;
-      win->is_visible = false;
     }
 }
 
@@ -552,7 +551,7 @@ void
 tui_check_register_values (struct frame_info *frame)
 {
   if (TUI_DATA_WIN != NULL
-      && TUI_DATA_WIN->is_visible)
+      && TUI_DATA_WIN->is_visible ())
     {
       if (TUI_DATA_WIN->regs_content.empty ()
          && TUI_DATA_WIN->display_regs)
@@ -667,12 +666,10 @@ tui_reg_command (const char *args, int from_tty)
       /* Make sure the register window is visible.  If not, select an
         appropriate layout.  We need to do this before trying to run the
         'next' or 'prev' commands.  */
-      if (TUI_DATA_WIN == NULL || !TUI_DATA_WIN->is_visible)
+      if (TUI_DATA_WIN == NULL || !TUI_DATA_WIN->is_visible ())
        tui_reg_layout ();
 
-      struct reggroup *current_group = NULL;
-      if (TUI_DATA_WIN != NULL)
-       current_group = TUI_DATA_WIN->current_group;
+      struct reggroup *current_group = TUI_DATA_WIN->current_group;
       if (strncmp (args, "next", len) == 0)
        match = tui_reg_next (current_group, gdbarch);
       else if (strncmp (args, "prev", len) == 0)
This page took 0.024834 seconds and 4 git commands to generate.