From: Tom Tromey Date: Sun, 23 Jun 2019 22:38:06 +0000 (-0600) Subject: Tidy tui_delete_win X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c2fc64f54ef82ccd2fedc9078c539ad273e83a0b;p=binutils-gdb.git Tidy tui_delete_win tui_delete_win does its own NULL check, so ~tui_gen_win_info does not need to do it. Also, tui_delete_win has an extraneous "return". gdb/ChangeLog 2019-06-25 Tom Tromey * tui/tui-wingeneral.c (tui_delete_win): Remove "return". * tui/tui-data.c (~tui_gen_win_info): Remove "if". --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 62e90533cac..ff05c1ccbe7 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2019-06-25 Tom Tromey + + * tui/tui-wingeneral.c (tui_delete_win): Remove "return". + * tui/tui-data.c (~tui_gen_win_info): Remove "if". + 2019-06-25 Tom Tromey * tui/tui-layout.c (init_and_make_win): Assert on unrecognized diff --git a/gdb/tui/tui-data.c b/gdb/tui/tui-data.c index a018a4bf6ab..a62dbf4d670 100644 --- a/gdb/tui/tui-data.c +++ b/gdb/tui/tui-data.c @@ -350,11 +350,7 @@ tui_source_window_base::tui_source_window_base (enum tui_win_type type) tui_gen_win_info::~tui_gen_win_info () { - if (handle != NULL) - { - tui_delete_win (handle); - handle = NULL; - } + tui_delete_win (handle); xfree (title); } diff --git a/gdb/tui/tui-wingeneral.c b/gdb/tui/tui-wingeneral.c index 13063ae9356..cf8d9fc3959 100644 --- a/gdb/tui/tui-wingeneral.c +++ b/gdb/tui/tui-wingeneral.c @@ -63,8 +63,6 @@ tui_delete_win (WINDOW *window) { if (window != NULL) delwin (window); - - return; }