aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2021-01-15 20:21:04 +0000
committerAndrew Burgess <andrew.burgess@embecosm.com>2021-01-15 20:23:12 +0000
commit5a11fff00597647e3ac6b2f921126049403c17a3 (patch)
tree376a33ab66838854203e7a964cf0a3e5017e7886
parent10f92414d6d4a5f8eb8cbb2bf39ca86c1f9c1da5 (diff)
downloadgdb-5a11fff00597647e3ac6b2f921126049403c17a3.zip
gdb-5a11fff00597647e3ac6b2f921126049403c17a3.tar.gz
gdb-5a11fff00597647e3ac6b2f921126049403c17a3.tar.bz2
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.
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/tui/tui.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a0455e1..9ac7b46 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2021-01-15 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * tui/tui.c (tui_is_window_visible): Compare to nullptr, not 0.
+
2021-01-14 Lancelot Six <lsix@lancelotsix.com>
* MAINTAINERS (Write After Approval): Add myself.
diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c
index 3a2229d..ce8dab3 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 ();
}