From c9753adb0153fbb5ce01583881862642e7f126af Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 1 Jul 2020 21:21:12 -0600 Subject: [PATCH] Remove useless "if' from tui-regs.c tui_data_window::show_register_group had a useless "if" -- the condition could never be false. This patch removes it. gdb/ChangeLog 2020-07-01 Tom Tromey * tui/tui-regs.c (tui_data_window::show_register_group): Remove useless "if". --- gdb/ChangeLog | 5 +++++ gdb/tui/tui-regs.c | 11 ++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index cb0eb08afd8..eeb8bdc0559 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2020-07-01 Tom Tromey + + * tui/tui-regs.c (tui_data_window::show_register_group): Remove + useless "if". + 2020-07-01 Tom Tromey * tui/tui-regs.c (tui_data_window::show_register_group): Update. diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c index 39f5d736392..51fc475beda 100644 --- a/gdb/tui/tui-regs.c +++ b/gdb/tui/tui-regs.c @@ -257,15 +257,12 @@ tui_data_window::show_register_group (struct reggroup *group, continue; data_item_win = &m_regs_content[pos]; - if (data_item_win) + if (!refresh_values_only) { - if (!refresh_values_only) - { - data_item_win->item_no = regnum; - data_item_win->highlight = false; - } - tui_get_register (frame, data_item_win, regnum, 0); + data_item_win->item_no = regnum; + data_item_win->highlight = false; } + tui_get_register (frame, data_item_win, regnum, 0); pos++; } } -- 2.30.2