public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Tom Tromey <tromey@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Tidy tui_delete_win Date: Tue, 25 Jun 2019 14:03:00 -0000 [thread overview] Message-ID: <20190625140357.47020.qmail@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c2fc64f54ef82ccd2fedc9078c539ad273e83a0b commit c2fc64f54ef82ccd2fedc9078c539ad273e83a0b Author: Tom Tromey <tom@tromey.com> Date: Sun Jun 23 16:38:06 2019 -0600 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". Diff: --- gdb/ChangeLog | 5 +++++ gdb/tui/tui-data.c | 6 +----- gdb/tui/tui-wingeneral.c | 2 -- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 62e9053..ff05c1c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 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 type. * tui/tui-data.h (struct tui_gen_win_info): Make constructor diff --git a/gdb/tui/tui-data.c b/gdb/tui/tui-data.c index a018a4b..a62dbf4 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 13063ae..cf8d9fc 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; }
reply other threads:[~2019-06-25 14:03 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20190625140357.47020.qmail@sourceware.org \ --to=tromey@sourceware.org \ --cc=gdb-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).