[pushed] Use boolean literals in linux-nat.c

Tom Tromey tromey@adacore.com
Fri Jul 17 15:21:25 GMT 2020


I noticed a couple of spots in linux-nat.c that use 0/1 where boolean
literals would be more idiomatic.  This patch makes this change.

gdb/ChangeLog
2020-07-17  Tom Tromey  <tromey@adacore.com>

	* linux-nat.c (linux_nat_target::supports_non_stop)
	(linux_nat_target::always_non_stop_p): Use "true".
	(linux_nat_target::supports_disable_randomization): Use "true" and
	"false".
---
 gdb/ChangeLog   | 7 +++++++
 gdb/linux-nat.c | 8 ++++----
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index fde360f5080..03d52ba4f09 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -4174,7 +4174,7 @@ linux_nat_target::can_async_p ()
 bool
 linux_nat_target::supports_non_stop ()
 {
-  return 1;
+  return true;
 }
 
 /* to_always_non_stop_p implementation.  */
@@ -4182,7 +4182,7 @@ linux_nat_target::supports_non_stop ()
 bool
 linux_nat_target::always_non_stop_p ()
 {
-  return 1;
+  return true;
 }
 
 /* True if we want to support multi-process.  To be removed when GDB
@@ -4200,9 +4200,9 @@ bool
 linux_nat_target::supports_disable_randomization ()
 {
 #ifdef HAVE_PERSONALITY
-  return 1;
+  return true;
 #else
-  return 0;
+  return false;
 #endif
 }
 
-- 
2.26.2



More information about the Gdb-patches mailing list