From 5a11fff00597647e3ac6b2f921126049403c17a3 Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Fri, 15 Jan 2021 20:21:04 +0000 Subject: [PATCH] gdb/tui: compare pointer to nullptr, not 0 Compare pointers to nullptr, not 0. I also fixed a trailing whitespace in the same function. There should be no user visible changes after this commit. gdb/ChangeLog: * tui/tui.c (tui_is_window_visible): Compare to nullptr, not 0. --- gdb/ChangeLog | 4 ++++ gdb/tui/tui.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a0455e18fb2..9ac7b46effd 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2021-01-15 Andrew Burgess + + * tui/tui.c (tui_is_window_visible): Compare to nullptr, not 0. + 2021-01-14 Lancelot Six * MAINTAINERS (Write After Approval): Add myself. diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c index 3a2229db16c..ce8dab3c642 100644 --- a/gdb/tui/tui.c +++ b/gdb/tui/tui.c @@ -544,9 +544,9 @@ tui_is_window_visible (enum tui_win_type type) if (!tui_active) return false; - if (tui_win_list[type] == 0) + if (tui_win_list[type] == nullptr) return false; - + return tui_win_list[type]->is_visible (); } -- 2.30.2