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  <tom@tromey.com>

	* tui/tui-wingeneral.c (tui_delete_win): Remove "return".
	* tui/tui-data.c (~tui_gen_win_info): Remove "if".
This commit is contained in:
Tom Tromey
2019-06-23 16:38:06 -06:00
parent fb54fa768d
commit c2fc64f54e
3 changed files with 6 additions and 7 deletions

View File

@ -1,3 +1,8 @@
2019-06-25 Tom Tromey <tom@tromey.com>
* tui/tui-wingeneral.c (tui_delete_win): Remove "return".
* tui/tui-data.c (~tui_gen_win_info): Remove "if".
2019-06-25 Tom Tromey <tom@tromey.com>
* tui/tui-layout.c (init_and_make_win): Assert on unrecognized

View File

@ -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);
}

View File

@ -63,8 +63,6 @@ tui_delete_win (WINDOW *window)
{
if (window != NULL)
delwin (window);
return;
}