public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Remove redundant check from tui_refresh_frame_and_register_information
@ 2024-02-08 19:34 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2024-02-08 19:34 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a6a25f5e2664872f2c3de707fffcb1669b03aeb1

commit a6a25f5e2664872f2c3de707fffcb1669b03aeb1
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Dec 17 12:15:00 2023 -0700

    Remove redundant check from tui_refresh_frame_and_register_information
    
    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>
    Approved-By: Andrew Burgess <aburgess@redhat.com>

Diff:
---
 gdb/tui/tui-hooks.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

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)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-02-08 19:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-08 19:34 [binutils-gdb] Remove redundant check from tui_refresh_frame_and_register_information Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).