]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove NULL check from tui_reg_command
authorTom Tromey <tom@tromey.com>
Sat, 13 Jul 2019 21:53:44 +0000 (15:53 -0600)
committerTom Tromey <tom@tromey.com>
Tue, 20 Aug 2019 22:22:04 +0000 (16:22 -0600)
tui_reg_command has an unnecessary NULL check.  The preceding call to
tui_reg_layout will ensure the window exists.  This patch removes the
check.

gdb/ChangeLog
2019-08-20  Tom Tromey  <tom@tromey.com>

* tui/tui-regs.c (tui_reg_command): Remove NULL check.

gdb/ChangeLog
gdb/tui/tui-regs.c

index c4a1179ce0bc51d57910d3ae87f3fe1a330c5f5e..ce64e7acccf496260c98cf5cfd1b729ad0af4ec4 100644 (file)
@@ -1,3 +1,7 @@
+2019-08-20  Tom Tromey  <tom@tromey.com>
+
+       * tui/tui-regs.c (tui_reg_command): Remove NULL check.
+
 2019-08-20  Tom Tromey  <tom@tromey.com>
 
        * tui/tui-source.h (struct tui_source_window): Update.
index 8fcb7bc46bc505ae7e340889d316cfe6dfcd36a1..b3c7ce627b46de0d7a8c16026ac0e4ef9c7fadbf 100644 (file)
@@ -669,9 +669,7 @@ tui_reg_command (const char *args, int from_tty)
       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)