[v2,11/14] Remove redundant check from tui_refresh_frame_and_register_information

Message ID 20240120-tui-regs-cleanup-v2-11-a3cccc6a3573@tromey.com
State New
Headers
Series Cleanups for the TUi register window |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gdb_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gdb_check--master-arm success Testing passed

Commit Message

Tom Tromey Jan. 20, 2024, 6:23 p.m. UTC
  tui_refresh_frame_and_register_information checks 'from_stack' in a
block that's already guarded by a 'from_stack' check.  This patch
removes the redundant check.

Tested-By: Tom de Vries <tdevries@suse.de>
Reviewed-By: Andrew Burgess <aburgess@redhat.com>
---
 gdb/tui/tui-hooks.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
  

Patch

diff --git a/gdb/tui/tui-hooks.c b/gdb/tui/tui-hooks.c
index 3a4eda91aa3..fc7ffb4f202 100644
--- a/gdb/tui/tui-hooks.c
+++ b/gdb/tui/tui-hooks.c
@@ -132,11 +132,10 @@  tui_refresh_frame_and_register_information ()
 
       /* Display the frame position (even if there is no symbols or
 	 the PC is not known).  */
-      bool frame_info_changed_p = tui_show_frame_info (fi);
+      tui_show_frame_info (fi);
 
       /* Refresh the register window if it's visible.  */
-      if (tui_is_window_visible (DATA_WIN)
-	  && (frame_info_changed_p || from_stack))
+      if (tui_is_window_visible (DATA_WIN))
 	TUI_DATA_WIN->check_register_values (fi);
     }
   else if (!from_stack)