[PUSHED] gdb/tui: compare pointer to nullptr, not 0
Andrew Burgess
andrew.burgess@embecosm.com
Fri Jan 15 20:24:44 GMT 2021
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/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.25.4
More information about the Gdb-patches
mailing list