diff options
author | Tom Tromey <tom@tromey.com> | 2020-07-01 21:21:12 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2020-07-01 21:21:14 -0600 |
commit | c9753adb0153fbb5ce01583881862642e7f126af (patch) | |
tree | 33d83dd4ef20e7e5af35dcc898303ce8dbd325ed | |
parent | 9ab26b4a0fdc5fba707abf56abfb4c503b35c3e5 (diff) | |
download | gdb-c9753adb0153fbb5ce01583881862642e7f126af.zip gdb-c9753adb0153fbb5ce01583881862642e7f126af.tar.gz gdb-c9753adb0153fbb5ce01583881862642e7f126af.tar.bz2 |
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 <tom@tromey.com>
* tui/tui-regs.c (tui_data_window::show_register_group): Remove
useless "if".
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/tui/tui-regs.c | 11 |
2 files changed, 9 insertions, 7 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index cb0eb08..eeb8bdc 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2020-07-01 Tom Tromey <tom@tromey.com> + * tui/tui-regs.c (tui_data_window::show_register_group): Remove + useless "if". + +2020-07-01 Tom Tromey <tom@tromey.com> + * tui/tui-regs.c (tui_data_window::show_register_group): Update. * tui/tui-regs.h (struct tui_data_item_window) <name>: Remove. diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c index 39f5d73..51fc475 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++; } } |