aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch-selftests.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2024-05-10 11:54:15 -0600
committerTom Tromey <tromey@adacore.com>2024-05-10 13:22:25 -0600
commite14f6ec969d788b73ac61f61e8c623536cda1cad (patch)
tree07adc8b895a95a5e2eaea163efd9575f3060c186 /gdb/gdbarch-selftests.c
parent04e63f26ba5f661fe28503e9aeb99fbdc5ea9a7b (diff)
downloadgdb-e14f6ec969d788b73ac61f61e8c623536cda1cad.zip
gdb-e14f6ec969d788b73ac61f61e8c623536cda1cad.tar.gz
gdb-e14f6ec969d788b73ac61f61e8c623536cda1cad.tar.bz2
Change gdbarch_inner_than to return bool
A recent patch from Andrew pointed out that gdbarch_inner_than returns 'int', while it should really return 'bool'. Approved-By: Pedro Alves <pedro@palves.net>
Diffstat (limited to 'gdb/gdbarch-selftests.c')
-rw-r--r--gdb/gdbarch-selftests.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/gdbarch-selftests.c b/gdb/gdbarch-selftests.c
index db99fe0..dbb9341 100644
--- a/gdb/gdbarch-selftests.c
+++ b/gdb/gdbarch-selftests.c
@@ -173,8 +173,8 @@ check_stack_growth (struct gdbarch *gdbarch)
implementation by calling gdbarch_inner_than. GDB assumes that stacks
either grow down or up (see uses of gdbarch_stack_grows_down), so exactly
one of these needs to be true. */
- bool stack_grows_down = gdbarch_inner_than (gdbarch, 1, 2) != 0;
- bool stack_grows_up = gdbarch_inner_than (gdbarch, 2, 1) != 0;
+ bool stack_grows_down = gdbarch_inner_than (gdbarch, 1, 2);
+ bool stack_grows_up = gdbarch_inner_than (gdbarch, 2, 1);
SELF_CHECK (stack_grows_up != stack_grows_down);
}